Commit Graph

651 Commits

Author SHA1 Message Date
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
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
69659cb96d Merge "Fingerprint Strong auth timeout" into nyc-mr1-dev 2016-09-23 07:01:51 +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 8f010dd25d)
2016-09-15 12:01:26 +00:00
Vladislav Kuzkokov
5a122a1ce9 Add DevicePolicyManager.setBackupServiceEnabled as hidden API.
BUG=28628532

Change-Id: I48c3423734e54b6a4d70e58d50c98c3e17790e0d
(based on a820252460)
2016-09-14 12:01:56 +02: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
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
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
b038c4f617 Merge "Only check password length for relevant qualities." into nyc-mr1-dev 2016-08-25 14:50:29 +00: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
Victor Chang
8560a7c2a1 Fix ConfirmCredential is not presented before trusting cert installed by PO/DO
- TrustedCredential is responsible to show ConfirmCredential
- Show the MonitoringCerInfoActivity in personal side instead to avoid showing work challenge
- put user id into extra

Bug: 28619980
Change-Id: Iedbc0b721ef56675f3c9eb6f1d12daf1222ad080
2016-05-09 16:05:32 +01:00
Rubin Xu
0fb6b9e18c Guard retrievePreRebootSecurityLogs with config flag
Bug: 28160645
Change-Id: Ifce884c319019758dfaaa39bc239e9f30962c920
2016-05-05 12:00:50 +01:00
Paul Lawrence
fc0810b4d4 Merge "Revert "Don't enforce this API - it's not sensitive"" into nyc-dev 2016-05-04 22:46:10 +00:00
Paul Lawrence
9de713d422 Revert "Don't enforce this API - it's not sensitive"
This reverts commit 895504e557.
Also adds a change to device manager to prevent failure there
as in the bug below.

Bug: 28512889

Change-Id: I4a445ec365133e9e2764e2d625d61fc6ee2008ec
2016-05-04 18:25:23 +00:00
Robin Lee
dc67971a99 Add lockdownEnabled parameter to always-on VPN API
Allows callers to opt-out of blockading network traffic during boot and
on VPN app failure.

Bug: 26694104
Change-Id: Ibfbd43ad09a25f2e38053fcd6306df3711f8bde2
2016-05-03 13:24:42 +01:00
Jeff Sharkey
ce18c81677 Introduce "unlocking" vs "unlocked" nuance.
There is a narrow window of time during user unlock where we're
reconciling user storage and dispatching the "unlock" status to
various internal system services.  While in this "unlocking" state,
apps need to be told that the user still isn't actually "unlocked"
so they don't try making calls to AccountManager, etc.

The majority of internal services are interested in merging together
both the "unlocking" and "unlocked" state, so update them.

Clarify naming in AccountManagerService to make it clear that a local
list is being used, which mirrors the naming in MountService.

To match UX/PM requested behavior, move PRE_BOOT_COMPLETED dispatch
after the user is unlocked, but block BOOT_COMPLETED dispatch until
after all PRE_BOOT receivers are finished to avoid ANRs.

Bug: 28040947, 28164677
Change-Id: I57af2351633d9159f4483f19657ce0b62118d1ce
2016-04-28 10:51:39 -06:00
Victor Chang
c0440e5f4d Merge "Deleting lock screen clears all CA approvals" into nyc-dev 2016-04-22 11:02:43 +00:00
Victor Chang
dc068eba6f Deleting lock screen clears all CA approvals
When both screenlocks for profile user and parent user has been removed (both set to none),
remove CA approvls on that user, and show the "Certificate authority installed" notification.

Bug: 28161447
Change-Id: I3c78dc5cfcdf7c02c91b64abe44984ee790d8f3e
2016-04-21 16:55:34 +01:00
Kenny Guy
38dcca51a7 Add test method to remove admins.
Add test method to remove admins that declare
FLAG_TEST_APP without informing them.
The method will also remove the device and profile
owner status of the admin.

Bug: 28027468
Change-Id: Idb4d3299a9c6595c94bfb424546cd8a384131835
2016-04-19 20:10:56 +01:00
Sudheer Shanka
fd580f7d1a Merge "Update {set,get}{Long,Short}SupportMessage APIs to use CharSequence." into nyc-dev 2016-04-13 20:12:05 +00:00
Michal Karpinski
1271cef419 Merge "API polish in DPM for organization color and name methods" into nyc-dev 2016-04-13 13:28:08 +00:00
Victor Chang
caf566a537 Merge "Update display text in cert notification" into nyc-dev 2016-04-13 10:15:29 +00:00
Michal Karpinski
74cd73079c API polish in DPM for organization color and name methods
- Returning and accepting CharSequence instead of String
- Enforcing 100% opacity and adjusting javadocs for color
format
- Adding @ColorInt annotations

Bug: 27531295
Change-Id: Id27d4fd5e7bb4d746cc61288457eb4eb86224505
2016-04-12 15:17:52 +01:00
Sudheer Shanka
3ccca91e6e Update {set,get}{Long,Short}SupportMessage APIs to use CharSequence.
Bug: 27531295
Change-Id: Ib28c509a3112046c14d812265ce43bc5b5574f12
2016-04-11 21:46:24 -07:00
Fyodor Kupolov
4c74334c44 Merge "Added getProfileIds method returning array of userIds" into nyc-dev 2016-04-11 16:40:55 +00:00
Victor Chang
355d47697c Update display text in cert notification
- Show DPC app name for PO
- Check user id for DO
- Update notification title for all cases
- update symbols for private resource ssl_ca_cert_warning changed from string to plural
- Pass number of certificate to MonitoringCertInfoActivity

Bug: 25772443
Bug: 18224038
Change-Id: I68db06f55a24879c1d5f532e38b97e2932bf990e
2016-04-11 15:00:50 +01:00
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