672 Commits

Author SHA1 Message Date
Michal Karpinski
bc755da55c Don't expose default strong auth timeout as constant
am: 6dbf67fc48

Change-Id: Iacbe9a2de7024e29e9c2c98594ebca828b855a43
2016-10-13 22:52:38 +00:00
Greg Plesur
216ee1f0e7 Merge "DPM.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) should return 'false' for Wear devices after pairing/upgrade." into cw-f-dev 2016-10-13 21:02:01 +00:00
Greg Plesur
3514404984 DPM.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE) should
return 'false' for Wear devices after pairing/upgrade.

BUG: 32019375
Change-Id: I2563efe58c98c5dd8440891e478c89e093d8d9ac
2016-10-13 15:08:14 -04:00
Vladislav Kuzkokov
98a145b5af Revert "Fix backup for users hit by erroneous backup disabling"
am: 9f61d17e6a

Change-Id: I460fbb670fbc7a724c981c4fceae0048ff4c9ded
2016-10-13 08:41:52 +00:00
Michal Karpinski
6dbf67fc48 Don't expose default strong auth timeout as constant
The admin can instead use the value of 0 to reset to default.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Bug: 31430135
Change-Id: I0d6b29ca4eca65d7ca72a8975a0c28c9050a946c
(cherry picked from commit 943aabd11cce3ab453762d3912395363720e1f5d)
2016-10-12 09:34:12 +00:00
Vladislav Kuzkokov
9f61d17e6a Revert "Fix backup for users hit by erroneous backup disabling"
BUG=31754835
This reverts commit 1975021d88da6623a570a6ddab8b2397b1c0e59f.

Change-Id: I5cf7862126755a34cf3b4d70436529401fddc87f
2016-10-06 11:13:40 +00:00
Vladislav Kuzkokov
cfaef4287d Fix logic in disabling BackupTransport in DO mode.
am: bbaadc0166

Change-Id: I89c0a7fb44bc50efedf2e8dc5eabaa4711b2687b
2016-09-28 21:26:00 +00:00
Vladislav Kuzkokov
56d7022d48 Fix backup for users hit by erroneous backup disabling
am: 1975021d88

Change-Id: I4421e9642c2e89bf17535ef3212617d268c1c9d2
2016-09-28 21:24:44 +00:00
Vladislav Kuzkokov
cd339f211a Merge "Fix logic in disabling BackupTransport in DO mode." into nyc-mr1-dev 2016-09-28 21:15:09 +00:00
Vladislav Kuzkokov
1975021d88 Fix backup for users hit by erroneous backup disabling
BUG=31754835

Change-Id: I89dd08b7958dd8fe20d70bc50f2c89996ae46cc5
2016-09-28 21:31:16 +02:00
Vladislav Kuzkokov
bbaadc0166 Fix logic in disabling BackupTransport in DO mode.
We were disabling backup in consumer mode as well.

BUG=31754835
TEST=android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest

Change-Id: I42e5cfa512fda1b471eb62c7eb8bc346383da2fa
2016-09-28 20:24:42 +02:00
Makoto Onuki
2f78ab5387 Fix DPM unit tests, also fix a log message.
am: 6ad5f92512

Change-Id: Ieab914cf8538e3086fb32cc351e45e6a5c2017c5
2016-09-23 15:43:04 +00:00
Makoto Onuki
18fb24c5d3 Merge "Fix DPM unit tests, also fix a log message." into nyc-mr1-dev 2016-09-23 15:34:40 +00:00
Michal Karpinski
369672b8bb Fingerprint Strong auth timeout
am: 0b72a722ed

Change-Id: I70a4c0288aa2d98c02706a055a5dda710ace2ae2
2016-09-23 07:09:59 +00:00
Michal Karpinski
69659cb96d Merge "Fingerprint Strong auth timeout" into nyc-mr1-dev 2016-09-23 07:01:51 +00:00
Vladislav Kuzkokov
8a48085267 Add DevicePolicyManager.setBackupServiceEnabled as hidden API.
am: 5a122a1ce9

Change-Id: I134891f0b24cc666c34ae54cb3c937ba2f16648e
2016-09-22 20:03:40 +00:00
Makoto Onuki
6ad5f92512 Fix DPM unit tests, also fix a log message.
Bug 31446501

Change-Id: I37debbe2f4e983fb8bad026f8dd9bd91b7448dce
2016-09-19 14:23:02 -07:00
Michal Karpinski
0b72a722ed Fingerprint Strong auth timeout
Allows PO and DO configure strong auth timeout for fingerprint.

Bug: 31430135
Change-Id: Ie6451d49aa95527adc3720d9a2a0848f58940510
(cherry picked from commit 8f010dd25d18151cc47accc7d853b4f8f7fe8491)
2016-09-15 12:01:26 +00:00
Vladislav Kuzkokov
5a122a1ce9 Add DevicePolicyManager.setBackupServiceEnabled as hidden API.
BUG=28628532

Change-Id: I48c3423734e54b6a4d70e58d50c98c3e17790e0d
(based on a8202524608a4fc9178e6b18e13602c5a8abb404)
2016-09-14 12:01:56 +02:00
Makoto Onuki
c146ed5d26 Persist package's test-only flag and always use it
am: 46ea8e7f9d

Change-Id: Ib6a24171828bbdf884c9d71ab8c07622a8f1fddb
2016-09-12 21:39:38 +00:00
Makoto Onuki
46ea8e7f9d Persist package's test-only flag and always use it
Bug 31382361

Change-Id: Ie48aba5827074d2a6efb6966f61af30444376384
2016-09-09 12:43:22 -07:00
Robin Lee
12c4d4132f DO NOT MERGE Stop work challenge freeform bypass am: 0737c2b4c2 am: ec5ceae174
am: 32daa7a95c

Change-Id: I8580890ee0fcd6b1fb80352b4437d2a1379dfaee
2016-09-07 22:29:13 +00:00
Robin Lee
32daa7a95c DO NOT MERGE Stop work challenge freeform bypass am: 0737c2b4c2
am: ec5ceae174

Change-Id: Ic4bbce08944881f0d20a08c1ebb4db5531208f23
2016-09-07 22:23:10 +00:00
Robin Lee
ec5ceae174 DO NOT MERGE Stop work challenge freeform bypass
am: 0737c2b4c2

Change-Id: Ia76391f710e42e9634010bd211a0370230b318e3
2016-09-07 22:15:28 +00:00
Makoto Onuki
9d46e5e044 Allow DO/PO to be installed with certain preconfigured accounts.
am: 5e7e0670c7

Change-Id: I9191a60bf4071b8205c04131cb2d97ef1a32fb19
2016-09-07 21:40:20 +00:00
Makoto Onuki
5e7e0670c7 Allow DO/PO to be installed with certain preconfigured accounts.
- Non-test-only DO/PO still can't be installed when there are
accounts.

- Test-only DO/PO can be installed even when there are accounts,
as long as all the accounts have the
"android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED" feature.
Some authenticators claim to have any features, so to detect it,
we also check android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED
and disallow installing if any of the accounts have it.

- Also add logs on certain important events in DPMS.

Bug 28928996

Change-Id: I62efce10e9cc22e994ea8cae91a4fafcce25dd77
2016-09-06 11:56:45 -07:00
Robin Lee
0737c2b4c2 DO NOT MERGE Stop work challenge freeform bypass
Bypassing work challenge in freeform mode was trivial by just keeping
work apps open in freeform mode and then switching focus to them from
another app.

Because the only interception point is startActivity this never
triggered work challenge.

The solution is to trigger the check on focus change events and also to
allow passing the result back into the freeform stack instead of dumping
our user out into the homescreen.

Change-Id: I141ecf90b5f0e708a21d27141b6fec6074e5d475
Fix: 30693465
2016-08-26 14:39:34 +00:00
Andrew Scull
fce4b4acfc Only check password length for relevant qualities.
am: 83ab85410b

Change-Id: I89354ab06c70fd7b23d32aeebf84df85f6375765
2016-08-25 14:54:36 +00:00
Andrew Scull
b038c4f617 Merge "Only check password length for relevant qualities." into nyc-mr1-dev 2016-08-25 14:50:29 +00:00
Ashley Smith
67d9c792a8 Merge "Fixing NPE in device policy tests" into cw-f-dev 2016-08-08 16:22:40 +00:00
Ashley Smith
68a2a0feed Fixing NPE in device policy tests
Bug: 30224255
Change-Id: I5c21f8d0e5660cca1cf7861649195672348f802c
2016-08-05 11:24:02 -04:00
Suprabh Shukla
9704e409df Not trying to remove admins already being removed
If someone calls removeActiveAdminLocked more than once, it is possible
for the device policy data to end up with more than one copy of an admin
in the list mRemovingAdmins. Due to extra entries, once the admin
component is removed, it is not being allowed to be set as an admin again,
until the device reboots or mRemovingAdmins is cleared from the memory
due to some other reason. Fixing this by making sure we do not add
duplicate entries to mRemovingAdmins

Bug: 30369197
Change-Id: I1d53c41312171425bbd6e6e4153148276f1b098d
2016-08-04 17:05:12 -07:00
Andrew Scull
83ab85410b Only check password length for relevant qualities.
The minimum password length is only required for certain password
qualities so only check the minimum length in those cases.

Bug: 30109030
Change-Id: I330c88fc0b22179e126fc1241a9c58d5e0d73e8e
2016-07-29 10:17:49 +01:00
Tony Mak
c1205111a9 Persist master volume mute across reboot
Fix: 30133263

Change-Id: I53450a504e40e55516acc88550f369a74a244eaf
2016-07-22 17:12:54 +00:00
Makoto Onuki
0b4b58f507 Remove the DMAgent whitelisting
Bug 30075554

Change-Id: Ib089353ff9f58eb175a7b5d9addfb371655afc6b
2016-07-15 16:31:15 -07:00
Benjamin Franz
2aa9bab8a1 Add hidden API to store whether provisioning config has been applied
Bug: 29629204
Change-Id: Iaf4164357868b17dbc6615a77babb0e7cbc183b7
2016-07-12 17:20:18 +01:00
Mahaver Chopra
790d198860 Add an api to verify if ro.device_owner was set
Currently for OobConfig app we used DEVICE_PROVISIONED Global setting to
verify if device was provisioned. This setting can be modified using
adb. we just need to know if it was set atleast once. Added an api in
DPM to return whether system property "ro.device_owner" was set.

Bug: 29935702
Change-Id: I9a2b5217c0bc2cc11d68282e05a5450ea3f6cf21
2016-07-11 11:22:52 +01:00
Rubin Xu
ca081ca396 Bump ACTION_CHOOSE_PRIVATE_KEY_ALIAS broadcast to foreground
Bug: 29966726
Change-Id: Ifdbdd26df40518d9e50f9a0b0dfc5c01cb9accb2
2016-07-06 14:21:42 +01:00
Suprabh Shukla
f8c04cbe95 Enabling auto-ota in retail demo mode
Bug: 29542384
Change-Id: If7c94cf8a8e5851011f23dc5d64fc795f9a07b22
2016-06-28 14:38:29 -07:00
Amith Yamasani
d04aaa323c More thorough cleansing of expired users
If any /data/system_[c|d]e folders were not erased
when the user was removed (maybe due to a reboot),
make sure they're cleaned up on restart as well
as when the userId is recycled later.

Mark the users' system folders with the correct
serial number for later verification.

AccountManager shouldn't be querying accounts of
partially created/destroyed users.

Change-Id: I4313756b7464f34cd5ce4fb296d61daa50b41fcb
Fixes: 29285673
2016-06-15 11:32:16 -07:00
Makoto Onuki
26704957fe Don't take the DPMS lock in DPMI.createPackageSuspendedDialogIntent
This method is called by AM with the lock held, so can't take the
DPMS lock.

It still takes a different lock, but we don't call into the external
world while holding this lock, so this is fine.

Bug 29242568

Change-Id: Idbecdd7d97385ca66c693903443471fdbae833e6
2016-06-14 09:41:21 -07:00
Makoto Onuki
c29f62c738 Push DO/PO package names from DPMS to PM
Bug 29126573

Change-Id: I95ea1559f6acf5d2f0e1b0953568cdfc938e83b9
2016-06-08 11:52:13 -07:00
Ricky Wai
90c9dbc919 Do not get device owner admin info when device owner is null
Bug: 29043723
Change-Id: I355c549f891a5e71f654f42ed16a7139da86482a
2016-05-31 18:01:46 +01:00
Ricky Wai
977ade26dd Do not allow DPM.resetPassword() when child profile exists or user is locked
Bug: 28878708
Change-Id: Iaae2a9ba9c7c0ff388264c474c78a0dcd9fec258
2016-05-25 13:09:44 +00:00
Victor Chang
12753ded44 Fix Certificate authority installed notification is gone when turning off and on the work mode.
cause: Work mode is turned on before entering USER_STOPPED state.
Thus, BOOT_COMPLETED broadcast is not sent, but the notification has been dismissed.

use USER_STARTED + USER_UNLOCKED because both are foreground.

Bug: 28864104
Change-Id: I4796b61586e194d8367b9e52a9c56f858cbcbe7d
2016-05-23 17:41:01 +01:00
Sudheer Shanka
93f8fd714a Update RestrictedLockUtils to use UM.getUserRestrictionSource.
Bug: 28269827
Change-Id: Ib4a1441b71986ca6637a9236136b60e18dbc1643
2016-05-17 13:27:27 -07:00
Robin Lee
bc73347152 Merge "Skip 'network may be monitored' if dying or locked" into nyc-dev 2016-05-17 09:17:21 +00:00
Ashley Smith
820ae5a475 Fixing a NPE in DevicePolicyManagerService
Bug: 28786940
Change-Id: I73de8dea9221765ed0751039f3d472cf78d341af
2016-05-16 15:55:14 +00:00
Robin Lee
fe47b6eefa Skip 'network may be monitored' if dying or locked
KeyChain isn't direct boot aware & attempting to bind to a service
inside a dying user isn't going to end well.

Change-Id: I5a0acc34f98c39705ec404765c87e7ac61ca9b71
Fix: 28725354
2016-05-13 18:05:33 +01:00
Victor Chang
090b5a8e8c Merge "Fix ConfirmCredential is not presented before trusting cert installed by PO/DO" into nyc-dev 2016-05-11 14:43:15 +00:00