698 Commits

Author SHA1 Message Date
Tony Mak
6dc428f677 Allow device owner to inflate managed profile
1. Modify DPM.isProvisioningAllowed to allow it to happen
2. Introduce hidden API createProfileForUserEvenWhenDisallowed for
   ManagedProvisioning app to create profile under DO.
   Apps with MANAGE_USERS permission can clear the
   DISALLOW_ADD_USER restriction anyway, so they do not gain extra power.

Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
Test: cts-tradefed run cts --module DevicePolicyManager --test com.android.cts.devicepolicy.CustomDeviceOwnerTest#testIsProvisioningAllowed

Bug: 31895999

Change-Id: I10dc3043653130ae717a1d3d8256c9e73231bb21
2016-10-11 12:46:32 +00:00
Nicolas Prevot
700e1e7ee8 Don't allow the shell to change admin-locked app permissions.
BUG:27432532
Change-Id: I67f8794ea923edb5024033bb2a4474a1fb6d5fd9
2016-10-03 16:17:04 +01:00
Vladislav Kuzkokov
84ba6b0f27 Fix logic in disabling BackupTransport in DO mode. am: bbaadc0166 am: cfaef4287d
am: da82fa0a3f

Change-Id: Ib2215eda1c95b6e04429ca30011bb84789bb9b6e
2016-09-29 02:03:35 +00:00
Vladislav Kuzkokov
2555a1211d resolve merge conflicts of 852c394 to master
Change-Id: I75562584559c1b11111e316edded61587892ee8b
2016-09-29 01:42:42 +02: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
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
357ca56f8b Fix DPM unit tests, also fix a log message. am: 6ad5f92512 am: 2f78ab5387
am: 4001a2b4c4

Change-Id: Ifc1735798074af6758da5cc3a40d9adada1376cb
2016-09-25 21:26:31 +00: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
Michal Karpinski
4a134a93d2 Merge "Fingerprint Strong auth timeout" 2016-09-15 07:46:07 +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
3ef6f111c0 Persist package's test-only flag and always use it am: 46ea8e7f9d am: c146ed5d26
am: 47803d9cbd

Change-Id: I73d1d0f9d370e1e85b0dc487c9574d397afda64d
2016-09-14 05:59:26 +00: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
Suprabh Shukla
f9c376b786 resolve merge conflicts of 37ad463 to master
Change-Id: I51b2097ac3ea4ce3ec8bb29e674d1cdd789aa1a1
2016-09-07 15:55:04 -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
Michal Karpinski
8f010dd25d Fingerprint Strong auth timeout
Allows PO and DO configure strong auth timeout for fingerprint.

Bug: 29825955
Change-Id: Ie6451d49aa95527adc3720d9a2a0848f58940510
2016-09-02 15:42:27 +01:00
Tony Mak
1970f97e47 Send ACTION_DEVICE_OWNER_CHANGED broadcast after clearing device owner
Change-Id: Iaac182c69a30e941da3a017a923247d813881521
Fix: 27261692
2016-08-30 17:41:48 +01:00
Victor Chang
3f98ea1eee Merge "forceUpdateUserSetupComplete should have no effect in user build" 2016-08-30 12:38:53 +00:00
Victor Chang
3577ed2556 forceUpdateUserSetupComplete should have no effect in user build
Bug:30031808
Change-Id: I908a495633e03ace770a8ec19196841d19dfd41d
2016-08-26 18:36:44 +01: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
Vladislav Kuzkokov
a820252460 Add DevicePolicyManager.setBackupServiceEnabled as hidden API.
BUG=28628532

Change-Id: I48c3423734e54b6a4d70e58d50c98c3e17790e0d
2016-08-26 14:31:04 +02:00
TreeHugger Robot
feef989771 Merge "Add missing comment." 2016-08-25 17:17:50 +00:00
Rubin Xu
1e26c2950a Add missing comment.
Change-Id: I78b24c0a56e0f06a692e6e5665873c994241a487
2016-08-25 16:38:34 +01: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
Nicolas Prévot
c148ba90fb Merge "Allow DO to factory reset if it has set DISALLOW_FACTORY_RESET." 2016-08-25 11:23:27 +00:00
Nicolas Prevot
8d79662301 Allow DO to factory reset if it has set DISALLOW_FACTORY_RESET.
The Device Owner could remove this user restriction anyway.
Also do the same for PO in primary user.

BUG:27263403
Change-Id: I0f7b9a6237e40668b1eab2f55dc5c3f79e0d6eeb
2016-08-24 13:39:46 +01:00
Victor Chang
9bfc65f321 Add api to update user_setup_completed flag to allow e2e testing in ManagedProvisioning
Bug:30031808
Change-Id: Idd4b230931718a6d10f0fc41cdcf9bccb5c6354c
2016-08-24 11:48:09 +01:00
Ashley Smith
fb4d7e8838 Fixing NPE in device policy tests am: 68a2a0feed
am: d83eee9445

Change-Id: I29a02cc933c1bb46b85bb70050123d3c223bed81
2016-08-08 16:37:00 +00:00
Ashley Smith
d83eee9445 Fixing NPE in device policy tests
am: 68a2a0feed

Change-Id: Ic637f7380d674e17b82ce417df82b8e940f92aa8
2016-08-08 16:29:56 +00:00
Ashley Smith
67d9c792a8 Merge "Fixing NPE in device policy tests" into cw-f-dev 2016-08-08 16:22:40 +00:00
Suprabh Shukla
f0b9bd4f80 Not trying to remove admins already being removed am: 9704e409df am: 636cd41893
am: 58da13b6fa

Change-Id: I2da5ec521d940156dc6f06019a0b85cddece0ce5
2016-08-05 23:36:16 +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
fe84fe01d7 Persist master volume mute across reboot am: c1205111a9
am: c33b549af8

Change-Id: Id5e57ebdf81824af0f86854d8668a05f8109e0e1
2016-07-25 10:45:02 +00:00
Tony Mak
c1205111a9 Persist master volume mute across reboot
Fix: 30133263

Change-Id: I53450a504e40e55516acc88550f369a74a244eaf
2016-07-22 17:12:54 +00:00
Andrew Scull
cca00b0e7f 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-22 15:36:55 +00:00