274 Commits

Author SHA1 Message Date
Craig Mautner
15df08abd8 Introduce android:lockTaskMode
The ability for tasks to be started in locktask mode or pinned is
dependent on the value of android:lockTaskMode for the root activity
of the task.

For bug 19995702

Change-Id: I514a144a3a0ff7dbdd4987da5361b94bdfe9a437
2015-04-15 14:27:56 -07:00
Benjamin Franz
47af53ed95 Merge "Introduce device owner API to disable the status bar" 2015-04-15 17:22:40 +00:00
Benjamin Franz
ea2ec97f37 Introduce device owner API to disable the status bar
Let the device owner disable the status bar to achieve multi-app single purpose
mode. When the status bar is disabled, quick settings, notifications and the
assist gesture are blocked.

Bug: 19533026
Change-Id: I72830798135136e5edc53e5e2221aebb9a7c7d57
2015-04-15 15:57:14 +01:00
Benjamin Franz
b4e2188321 Merge "Fix a SecurityException in setKeyguardEnabledState" 2015-04-15 08:29:15 +00:00
Benjamin Franz
3223106dab Fix a SecurityException in setKeyguardEnabledState
A SecurityException is currently thrown when calling this API as
LockPatternUtils.isSecure requires a permission that the DO does not
have.

Bug: 19533026
Change-Id: I28bebb647e46bb631cc4fa1a7c9571eadda69086
2015-04-14 18:19:49 +01:00
Andres Morales
317918e206 Merge changes from topic 'lss-update'
* changes:
  Add challenge to IGateKeeperService
  Wire up GateKeeper to LockSettingsService
2015-04-14 16:12:55 +00:00
Benjamin Franz
e36087e5b6 Introduce device owner API to disable the keyguard
Let the device owner disable the keyguard to achieve undisturbed single
use mode with multiple apps. Calling this API has no effect if a
password
has been set for the calling user.

Bug: 19533026
Change-Id: I6b726b7f36efb669359e9da4b7e3db1f8031dad5
2015-04-14 10:58:36 +01:00
Rubin Xu
c9c9f7b40e Merge "Add setOtaPolicy/getOtaPolicy API in DPMS" 2015-04-14 09:16:28 +00:00
Ricky Wai
0c606812c5 Merge "Add Bluetooth Contacts Sharing policy in DevicePolicyManager" 2015-04-14 08:59:18 +00:00
Ricky Wai
778ba13538 Add Bluetooth Contacts Sharing policy in DevicePolicyManager
Bug: 19990979

Change-Id: Ide9adf66eec5721e50573c03956a1b63b7e8b18b
2015-04-14 08:57:32 +00:00
Rubin Xu
8027a4ffc2 Add setOtaPolicy/getOtaPolicy API in DPMS
Allow device owners to set OTA policy for automatically accept/postpone
incoming OTA system updates. This class only provides the setting
and getting of OTA policy, the actual OTA subsystem should handle
and respect the policy stored here.

Bug: 19650524
Change-Id: I9b64949fab42097429b7da649039c13f42c10fd1
2015-04-14 09:34:03 +01:00
Andres Morales
8fa5665f0e Wire up GateKeeper to LockSettingsService
Adds:
- Communication to GKService
- password upgrade flow
- enroll takes previous credential

Change-Id: I0161b64642be3d0e34ff4a9e6e3ca8569f2d7c0a
2015-04-13 18:38:45 -07:00
Rubin Xu
c06bbbfe7a Merge "Grant cert installer access to installKeyPair()" 2015-04-13 22:29:12 +00:00
Craig Lafayette
dbe31a6616 Send device initializer status.
- Create method in DevicePolicyManager to send device
  provisioning status to ManagedProvisioning.
- Define status updates used by ManagedProvisioning.

Bug: 20001077
Change-Id: Ia98fc765d1ebb2ba9680636ca15c2c870d160261
2015-04-13 09:14:33 -04:00
Craig Mautner
30b8984903 Merge "No longer unlock activity manager to test whitelist" 2015-04-07 16:17:57 +00:00
Craig Mautner
e56007786a No longer unlock activity manager to test whitelist
In order to check the DevicePolicyManagerService locktask whitelist
the activity manager had to release its lock preserving internal
state. That is undesirable and not scalable now that we need to check
the whitelist at startup for bug 19995702.

This change causes DPMS to update activity manager with the whitelist
whenever it changes so that activity manager can check the whitelist
without releasing the acitivty manager lock.

Change-Id: I3ed6eb5ceae2cd7e7ae3280abd708d5ce43a2851
2015-04-07 09:15:41 -07:00
Jeff Sharkey
16c9c249d5 Fix up ExternalStorageFormatter.
It's not going to be around for much longer, so just fix enough to
work correctly.

Also teach about new "unmountable" state from vold.

Bug: 19993667
Change-Id: Ib72c3e134092b2a895389dd5b056f4bb8043709a
2015-04-04 21:37:47 -07:00
Fyodor Kupolov
25da6b65b0 Merge "Do not log an error when app restriction file does not exist" 2015-04-03 16:43:41 +00:00
Fyodor Kupolov
6f34d363c3 Do not log an error when app restriction file does not exist
Bug: 20040207
Change-Id: Ibd257388a185020258e36bddf5b451dc24c0b7ee
2015-04-03 09:28:44 -07:00
Julia Reynolds
eaafdf72a4 Store the device initializer componentname in addition to package.
This removes ambiguity about which component in the initializer
package handles device initialization when setting up secondary users.
Bug: 19992262

Change-Id: I2e48168907725a56cd05d0b51c9f28b34fa28d1a
2015-04-03 08:27:34 -04:00
Rubin Xu
acdc1839cf Grant cert installer access to installKeyPair()
Bug: 20041977
Change-Id: Id0dc0bce8461c71d7220c1802dcca82933805996
2015-04-02 14:53:52 +01:00
Makoto Onuki
1040da1d4e Enterprise quick contact 1/2
Now openQuickContact goes thorough DPM.  When a lookup URI is build with
a lookup key returned by the enterprise lookup APIs for a corp contact, the
lookup key will have a special prefix.  In that case we go through DPM
and have it launch QC on the managed profile, if the policy allows.

For now we use the same DPM policy as enterprise-caller-id to disable this.

Design doc: go/cp2-mnc-enterprise-dd

Bug 19546108

Change-Id: I831a8190ae902ae3b1248cce6df02e3a48f602d2
2015-03-30 16:28:39 -07:00
Makoto Onuki
4fd8d4ab2a Revert "Enterprise quick contact 1/2"
This reverts commit 75a0882b946df6de4775c9e54ca023ff54f3f678.

Change-Id: Ibe332885824b228bf1b1147d141c9395554ff67f
2015-03-30 20:42:20 +00:00
Makoto Onuki
75a0882b94 Enterprise quick contact 1/2
Now openQuickContact goes thorough DPM.  When a lookup URI is build with
a lookup key returned by the enterprise lookup APIs for a corp contact, the
lookup key will have a special prefix.  In that case we go through DPM
and have it launch QC on the managed profile, if the policy allows.

For now we use the same DPM policy as enterprise-caller-id to disable this.

Design doc: go/cp2-mnc-enterprise-dd

Bug 19546108

Change-Id: I4840e7fad8a6a60249df07d993d26d03619650d4
2015-03-27 17:19:01 -07:00
Amith Yamasani
dfb1c2f205 am 17b03239: am 8562a7a1: am eedf2fe0: am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
* commit '17b03239d3152cbcf450ec66f077f07e4c1870e1':
  Fix NPE if FPE service does not exist.
2015-03-25 23:41:06 +00:00
Zoltan Szatmary-Ban
1181ed8a43 Add isActiveAdminWithPolicy to DevicePolicyManagerInternal
This method will be used by other system services to decide whether an
app is a profile owner or device owner.

Change-Id: I9577700d03ce2c80c798a60c6c2f480fd1913f43
2015-03-25 14:40:05 +00:00
Paul Crowley
a23995c233 Fix NPE if FPE service does not exist.
Bug: 19846662
Change-Id: I44e014c66a524b282cce0cfc9b7513fc0f553576
2015-03-25 11:43:42 +00:00
Rubin Xu
ec32b56cc2 Add DelegatedCertInstaller API in DPMS
Allow device/profile owner to delegate certificate APIs to third-party
certificate installer apps.

Bug: 19551274
Change-Id: Iaf9abb5ecb1dc0975fa98ea14408fe392d52fbf4
2015-03-20 10:11:29 +00:00
Benjamin Franz
bff46bac80 Add DO policy to disable safe boot mode.
Bug: 19615843
Change-Id: I14dbe911995ec216c57bd285d6b7b04c9684591a
2015-03-19 09:19:18 +00:00
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Julia Reynolds
1cc84c992c Merge "Allow initializers to clear reset protection data during device setup." 2015-03-17 22:13:32 +00:00
Robin Lee
ee1f24ff29 Merge "Recognise insecure encryption with a new constant" 2015-03-16 14:32:12 +00:00
Nicolas Prevot
8458e531bf Merge "Remove the owner userid of cross-profile intent filters." 2015-03-16 11:25:51 +00:00
Fyodor Kupolov
916b1e503d Merge "Changed the logic of calculating effective password limits" 2015-03-13 16:17:10 +00:00
Benjamin Franz
68cc42009e Allow DO to set Settings.Global.STAY_ON_WHILE_PLUGGED_IN
Bug: 19704419
Change-Id: I3fc970eae8ef947775b6b565916bb245dea1b43b
2015-03-13 09:44:44 +00:00
Fyodor Kupolov
0a32d35ce2 Changed the logic of calculating effective password limits
Admins without limit-password policy or passwordQuality below
PASSWORD_QUALITY_COMPLEX, should be excluded from the list when
calculating effective limits.

Bug: 19603660
Change-Id: I7b7d8498c8a072a4c050be48709ce34bddba39a5
2015-03-12 15:59:00 -07:00
Julia Reynolds
85865d55f0 Allow initializers to clear reset protection data during device setup.
This allows initializers to recover from failures that occur after
it has added an account on the primary user.

Change-Id: I3444f16520eed4b315d6ea4761f598f55d1e6ddd
2015-03-11 13:52:22 -04:00
Benjamin Franz
f3ece36535 Block setting wallpapers from managed profiles.
Silently fail when a managed profile app tries to change the
wallpaper and return default values for getters in that case.
This is implemented through a new AppOp that is controlled by
a new user restriction that will be set during provisioning.

Bug: 18725052
Change-Id: I1601852617e738be86560f054daf3435dd9f5a9f
2015-03-09 10:39:21 +00:00
Julia Reynolds
2482100fed Merge "Allow device and profile owners to set a user icon." 2015-03-05 23:39:04 +00:00
Julia Reynolds
1c3754a35c Add security check for clearDeviceInitializer in the service.
Bug: 19230954
Change-Id: I5c648492bef0d2b579b6f59b91afc890e3092d36
2015-03-05 11:47:14 -05:00
Nicolas Prevot
4b8d582151 Remove the owner userid of cross-profile intent filters.
The owner user id was used to identify in which user an app had set
a cross-profile intent filter. But it's not really necessary.

BUG:19505190

Change-Id: Iacc49d31c95e34efee1895e5fbe7224277dbc493
2015-03-05 15:28:54 +00:00
John Spurlock
75328b703f Merge "Audio: Remove the concept of master volume." 2015-03-04 22:59:41 +00:00
John Spurlock
ee5ad729b9 Audio: Remove the concept of master volume.
- Remove two config resources (use master volume, and volume ramp).
- Remove master volume adjustments / getters / intents.
- Retain @hidden setMasterMute, needed for device admin
- Remove master volume logic in AudioService.
- Remove master volume logic in VolumePanel.
- Rename "getMasterStreamType" to "getUiSoundsStreamType" to avoid confusion.

Bug: 19582978
Change-Id: Id02c8fa4898cff3b913147f5ac1b4038e2e7cc24
2015-03-04 17:51:44 -05:00
Julia Reynolds
e925440a55 DOs can clear the DI; rehide hasUserSetupCompleted.
Bug: 19230954
Change-Id: I97467229b23f3c9be1c3c4fff1c888a812f14a95
2015-03-04 17:36:00 -05:00
Julia Reynolds
fca04ca096 Allow device and profile owners to set a user icon.
Change-Id: I7c2bafb85cff3fa063af7a2f27b76c69172f0525
2015-03-04 16:04:22 -05:00
Julia Reynolds
20118f18c1 Allow the device initializer to perform user setup tasks.
A device initializer is an application that is allowed to run
during user provisioning on device owner devices. During
device provisioning (or, user provisioning of the first user
of the device), a device initializer is granted device owner
permissions. During secondary user provisioning, a device
initializer is granted profile owner permissions. Once
provisioning is complete for a user, all elevated permissions
are removed from the device initializer and the device admin
component of the app is disabled.

Bug: 19230954
Change-Id: Ib6725fb3b09bb21e4198a5dc0b445ccebb40b27e
2015-03-04 10:25:43 -05:00
Nicolas Prevot
abc03c7ae8 Merge "Fail silently when changing BLUETOOTH_ON/WIFI_ON directly" 2015-02-26 16:51:56 +00:00
Nicolas Prevot
41916d492c Fail silently when changing BLUETOOTH_ON/WIFI_ON directly
If the device owner tries to change BLUETOOTH_ON or WIFI_ON via
DevicePolicyManager.setGlobalSetting, fail silently.

There was not much point for the device owner to do it since it can
also change bluetooth/wifi state via normal bluetooth and wifi apis.

BUG:19311992

Change-Id: Ifba163800aa413865b8a2877cb21aacfa5cfc6c8
2015-02-26 11:57:29 +00:00
Esteban Talavera
4b7656f183 Allow setting a Device Owner via ADB on unprovisioned device with preinstalled account
Some devices come from carriers with a preinstalled account. This
means that we couldn't set a device owner via "adb shell dpm"
commands, while the regular device owner flow worked (as the
latter just checked whether the device was provisioned).

Bug: 18354022
Change-Id: I9a677de9d34d073e218b9179ec4b0f5b4b82adc9
2015-02-25 17:48:39 +00:00
Robin Lee
3795fb0a13 Recognise insecure encryption with a new constant
This is the default state on some devices which ship with encrypted key
storage set up already but no initial password.

Bug: 18048558
Change-Id: I055527fde21298bae2dbdca8c3a145f19b045aad
2015-02-23 11:46:33 +00:00