605 Commits

Author SHA1 Message Date
Nicolas Prévot
a078b4ba6a Merge "Still return a package suspsended dialog if there is no owner." into nyc-dev 2016-04-08 12:41:50 +00:00
Nicolas Prevot
8aa48028f3 Still return a package suspsended dialog if there is no owner.
When an application cannot be started, and there is no profile/device
owner, still return a PackageSuspendedDialog.

BUG: 28042198
Change-Id: I5c30393f9481840a965bb815235af5181561a063
2016-04-08 12:13:52 +01:00
Ricky Wai
035e924470 Fix work profile screen timeout policy
Settings screen should apply both primary and managed maximum
timeout policy, even separate profile challenge is enabled.

Bug: 27493348
Change-Id: Ia1ec1cafc7665c54816833af64e0f446a77a55b2
2016-04-07 17:16:03 +01:00
Ricky Wai
dc283a8976 Keymaster init for work profile
Changes:
(1) When unified work challenge is enabled and screen lock is secure
  - Store work profile secure key in primary profile
  - When primary user keystore unlocked, unlock work profile keystore
  - When primary user change lock to none, remove work secure key
(2) When unified work challenge is enabled but screen lock is not secure
  - When screen lock changes to secure, store work secure key in primary
(3) When user changes work challenge from unified to separated
  - Remove work secure key in primary
(4) When user changes work challenge from separate to unified
  - Do (1) and (2)

Bug: 27460698

Change-Id: I8f77bde5dc6b8e59c90256e75c5990100e93366b
2016-04-07 14:23:37 +00:00
Tony Mak
a01c1f0d90 Merge "xxxTrustAgentConfiguration should be supported in the parent DPM instance" into nyc-dev 2016-04-06 18:39:21 +00:00
Robin Lee
589b855719 Merge "Remove bool return from setAlwaysOnVpnPackage" into nyc-dev 2016-04-06 17:01:24 +00:00
Robin Lee
ee5eb934e3 Remove bool return from setAlwaysOnVpnPackage
Bug: 27533151
Change-Id: I4c656488e69cb5247dbb9cfd62d6f6f7043f9a90
2016-04-06 16:30:22 +01:00
Tony Mak
73ebf33d76 Merge "getProfiles should only returns non-partial user info" into nyc-dev 2016-04-05 17:24:30 +00:00
Sudheer Shanka
f4b30e2147 Merge "Remove the admin from the removing list when refreshing that admin." into nyc-dev 2016-04-05 17:21:36 +00:00
Tony Mak
80189cdece getProfiles should only returns non-partial user info
Bug: 26928524
Change-Id: I537bb0a9632cad603717a367b81d5e072452a6d7
2016-04-05 16:59:39 +00:00
Tony Mak
089d840383 xxxTrustAgentConfiguration should be supported in the parent DPM instance
1. Fix trust agent config does not persist across reboot
2. xxxTrustAgentConfiguration now supported in parent DPM instance

Bug: 27601827

Change-Id: I6ea4a089bf590d6c44be40318f3a69c35c54f796
2016-04-05 17:42:55 +01:00
Robin Lee
691b1a6005 Merge "Switch to work challenge if MP calls resetPassword" into nyc-dev 2016-04-05 14:04:40 +00:00
Sudheer Shanka
7c92133134 Remove the admin from the removing list when refreshing that admin.
Change-Id: I9b597a116db4f1fb894427b4e885f29c3e94abdb
Fixes: 27909181
2016-04-04 21:05:54 -07:00
Robin Lee
ce5c4009cf Switch to work challenge if MP calls resetPassword
If the profile owner wants to set a lock screen for a profile which they
created, we should let them. This will cancel any lock screen
unification that has been set up.

Attempting to clear the password will continue to throw
SecurityException if called from a managed profile.

Bug: 26682008
Change-Id: Ia09aef879a21c074ccb517905e43f62696837998
2016-04-01 16:12:32 +00:00
Robin Lee
f1fe782e91 Merge "API to approve CA certificates" into nyc-dev 2016-03-31 18:26:32 +00:00
Robin Lee
2f7e1e487c API to approve CA certificates
Bug: 18224038
Change-Id: Id928872cd70dac5a5ecfdcd52150fe6dea544e3b
2016-03-31 18:06:44 +01:00
Victor Chang
e04ac3d7d2 Merge "Unit test for isProvisioningAllowed" into nyc-dev 2016-03-31 17:04:38 +00:00
Andrei Stingaceanu
aa60469445 Merge "AfW - suspend apps - API polish" into nyc-dev 2016-03-31 10:57:58 +00:00
Sudheer Shanka
d2a968f9c3 Merge "Return null value if getActiveAdminUncheckedLocked returns null." into nyc-dev 2016-03-31 01:14:21 +00:00
Sudheer Shanka
549b969280 Return null value if getActiveAdminUncheckedLocked returns null.
- Split per user version of getUserRestrictions into a separate method
  in DPMS and make the per-user version return null if the admin
  parameter is not a valid one.
- Update isAccessibilityServicePermittedByAdmin and
  isInputMethodPermittedByAdmin to return false if the admin parameter
  is not a valid one.

Bug: 27909087
Change-Id: I6f4cae6552cbfe02dc4a92b04eeeddf0314e0974
2016-03-30 17:12:07 -07:00
Victor Chang
3e794afb82 Unit test for isProvisioningAllowed
Note:
DevicePolicyManagerService is changed to inject ContentObserver notifier

Test: all test cases in DevicePolicyManagerTest pass

BUG: 25710621
Change-Id: I347cec71769d0e9dd6a334d7d6339d5ce6a3fa6a
2016-03-30 20:27:22 +01:00
Rubin Xu
5b7ca24f14 Merge "Add DevicePolicyManager API to install a client cert chain." into nyc-dev 2016-03-30 17:46:18 +00:00
Clara Bayarri
30fb053449 Merge "Change default work challenge background color" into nyc-dev 2016-03-30 16:13:00 +00:00
Clara Bayarri
8d0bd7fa63 Change default work challenge background color
Requested by UX

Bug: 27829562
Change-Id: I815c06784189e68b09e464e936521e82091c93c3
2016-03-30 17:12:08 +01:00
Andrei Stingaceanu
b70ba1971c Merge "AfW custom lock screen message - API polish" into nyc-dev 2016-03-30 12:23:56 +00:00
Rubin Xu
b436591708 Add DevicePolicyManager API to install a client cert chain.
When installing a keypair the caller will have the option to specify a
certificate chain which will later be returned to whoever requests access
to the keypair via KeyChain.

Bug: 18239590
Change-Id: Id21ef026e31537db38d891cb9b712dd4fe7159c7
2016-03-30 11:57:58 +01:00
Andrei Stingaceanu
efc4a344a1 AfW - suspend apps - API polish
* renamed getPackageSuspended => isPackageSuspended
* does not return false for an error, instead throws
  NameNotFoundException if the package could not be
  found, or if there is an unknown RemoteException,
  wraps it in a RuntimeException and rethrows.

Bug: 27532430
Bug: 22776761
Change-Id: Iee00600089b1c0556a3312b10456826464fa8f9f
2016-03-29 14:49:21 +00:00
Rubin Xu
81a95700e5 Fix SecurityException in getStorageEncryptionStatus
Bug: 27892709
Change-Id: Ic6a3ccb8d266cfb04708413b767fe4f284219e57
2016-03-29 14:35:36 +01:00
Andrei Stingaceanu
16187903b4 AfW custom lock screen message - API polish
DevicePolicyManager:
* getDeviceOwnerLockScreenInfo now returns CharSequence as it returns a string
  for display to a user
* setDeviceOwnerLockScreenInfo
** accepts CharSequence, not String as this is a string displayed to the user
** Returns void; throws an appropriate runtime exception on failure

Bug: 27531295
Change-Id: I30528569cfa66ee76f857fbee1c3196f821718fd
2016-03-29 13:04:29 +00:00
Jeff Sharkey
fac4ddbd25 Work around buggy DMAgent.
They're targeting new API level, but they aren't handling the new
constants.

Bug: 27785116
Change-Id: I8391294d963c86af1f948b91c7d1de6b7f44f66a
2016-03-28 09:14:10 -06:00
Lenka Trochtova
a7c85adeda Let the profile owner set lock-to-apps if the user is affiliated.
BUG: 25632687

Change-Id: I76008b6a8e2194155154dc7693d43ce20f7e9fad
2016-03-24 11:15:23 +01:00
Victor Chang
d3c0cf50b6 Merge "Api change of DPM.setApplicationRestrictionsManagingPackage()" into nyc-dev 2016-03-21 13:08:14 +00:00
Victor Chang
cd14c0a9da Api change of DPM.setApplicationRestrictionsManagingPackage()
Throws NameNotFoundException instead of IllegalArgumentException

Can't throw NameNotFoundException directly from DPMS as
aidl doesn't support checked exception

Bug: 27532565
Change-Id: I202721f41057f92ad2dd851d4769ba4502a8f9b3
2016-03-18 16:44:21 +00:00
Jeff Sharkey
8a372a0a28 Refactoring FBE APIs based on council feedback.
Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
2016-03-17 14:49:08 -06:00
Michal Karpinski
6235a94ffa Unifying method names and comments to security logging, not device logging
Also move SecurityLog to android.app.admin package.

Bug: 27531824
Bug: 27532560
Bug: 27532564
Bug: 27532425
Change-Id: I2677afdb5685bc5d21e52c41b381b57a41e364b6
2016-03-16 14:32:09 +00:00
Mahaver Chopra
8a8e8ea19a Merge "Update DPM.reboot with new restriction" into nyc-dev 2016-03-15 19:48:33 +00:00
Mahaver Chopra
1216ae5d02 Update DPM.reboot with new restriction
DPM.reboot() should not be called when there is an ongoing call on the
device.

Bug:27531799
Change-Id: Idc1fa4c7aa79b20ec9c2afcccf855455ee316787
2016-03-15 19:46:05 +00:00
Sudheer Shanka
b5a4d9605f Merge "Show admin support dialog if app is suspended." into nyc-dev 2016-03-15 18:50:01 +00:00
Sudheer Shanka
7a9c34bd7a Show admin support dialog if app is suspended.
Bug: 26922950
Change-Id: I21f048873244df52d14910cc01a658af476d9149
2016-03-15 10:40:04 -07:00
Michal Karpinski
c4927b9fd4 Logging of setting ro.device_owner property
Without logging of setting it's impossible to test the setup, unless
device is rooted.

Bug: 22860162
Change-Id: I0532654ef4e4b7272d2749b30590a1b47da9f645
2016-03-15 17:04:59 +00:00
Makoto Onuki
d4c9e541ec Add ENCRYPTION_STATUS_ACTIVE_PER_USER to...
getStorageEncryptionStatus()
Use StorageManager APIs to get the encryption
state instead of from the system properties
directly.

Bug 26547262

Change-Id: Ic27baa9489d43a93873f8bb0428084f8886aed67
2016-03-11 15:50:04 -08:00
Paul Lawrence
03128dceab Fix bug in new encryption API
Bug: 27583871
Change-Id: I372f0a6a411704dc57ca9bcc53c4c5a10b236772
2016-03-10 10:02:07 -08:00
Michal Karpinski
2f79ae98af Tuning down wtf to warning for setting ro.device_owner property
This was logged to often, especially while running CTS hostside tests
and looked too scary to people.

Bug: 27230864
Change-Id: I9e81d9efe87b4aed18aa473be647c560ff9cfa0d
2016-03-10 15:00:08 +00:00
Paul Lawrence
d5a3f3df40 Merge "Add API to IMountService to get encryption state" into nyc-dev 2016-03-09 13:42:41 +00:00
Paul Lawrence
20be5d6247 Add API to IMountService to get encryption state
Bug: 18002358
Change-Id: If7d9c9a5ed38ac37849fcf638ec10c76d2f419a1
2016-03-08 15:03:54 -08:00
Sudheer Shanka
97e89c624e Merge "Update DPM.getWifiMacAddress to take admin component as argument." into nyc-dev 2016-03-08 22:52:11 +00:00
Tony Mak
29d6b9f0f7 Merge "clear calling identity before calling getUserInfo" into nyc-dev 2016-03-08 18:09:35 +00:00
Makoto Onuki
ed58f5f0aa Merge "Introducing ShortcutManager" into nyc-dev 2016-03-08 18:01:05 +00:00
Tony Mak
4d9abf92d4 clear calling identity before calling getUserInfo
Bug: 27523508
Change-Id: I243a5423de850477cf65968c8ea26cbb3ae896d5
2016-03-08 17:00:22 +00:00
Sudheer Shanka
3cb4da16dc Update DPM.getWifiMacAddress to take admin component as argument.
Bug: 27532280
Change-Id: I3a5e9557c3c6ac43c458c911a5309bdb2655fb66
2016-03-07 18:51:49 -08:00