335 Commits

Author SHA1 Message Date
Svetoslav
5bd5d4c2b0 Clear binder identity before reaching into keyguard settings
Change-Id: I80eeaed235acc165ddd4799ba46700afea2dff55
2015-04-23 15:55:03 -07:00
Craig Mautner
1513ff171a Fix NPE when load() returns nulls.
Fixes bug 20528625.

Change-Id: I825c95fd212a1928a34e9ed0e20d2f7563939cbb
2015-04-23 12:52:58 -07:00
Craig Mautner
015c5e57b5 Disallow data clearing of DeviceOwner.
There are OEM provided apps that are able to clear the data of the
device owner. That creates a security hole that this fixes.

Fixes bug 20107015.

Change-Id: I4ef313b394bd8059d19d20aa6533396305d1357d
2015-04-23 11:05:02 -07:00
Craig Mautner
5173dc28f3 Add and remove DeviceInitializer from whitelist
Add the DeviceInitializer to the locktask whitelist when set or when a
new user is created. Remove DeviceInitializer from whitelist when
user setup complete.

Fixes bug 20267837.

Change-Id: I8a33bceb6e6f3d0316a1227b2ed2b713f4ca3a9e
2015-04-23 08:30:20 -07:00
Rubin Xu
dc105cc91c Enable system service to notify device owners about pending update
Create a DevicePolicyManager API which can be used by OTA subsystem
to tell device owners about pending updates. Device owners will get
a callback from its DeviceAdminReceiver when the update service sends
out such notifications.

Bug: 20213644
Change-Id: Ifcc755655e4f441980cf77d76175a046112ca9ae
2015-04-22 22:11:04 +01:00
Benjamin Franz
07ba37a713 Merge "Recover status bar enabled state for all users" 2015-04-22 11:43:03 +00:00
Benjamin Franz
6d6290d282 Merge "Check for null packages in setLockTaskPackages" 2015-04-22 11:00:02 +00:00
Benjamin Franz
837f1035a6 Recover status bar enabled state for all users
Move the update of status bar enabled setting to loadSettingsLocked and
thereby recovering the enabled state for all users, not only the user
owner.

Bug: 20416833
Change-Id: Iee3d6e0f3ea8ebc5d72c0ed165bea4595ed073ba
2015-04-22 11:44:57 +01:00
Andrei Kapishnikov
4eb6a36922 Introduced DO_NOT_ASK_CREDENTIALS_ON_BOOT flag
A new flag for DPM.resetPassword() method that specifies that the
device should be decrypted without asking for the password or pattern.

Bug 19250601

Related CL in Settings App: https://googleplex-android-review.git.corp.google.com/#/c/670206

Change-Id: I9ca3472dc18e66e618ff772dee16ca4a450e9997
2015-04-21 11:07:09 -04:00
Benjamin Franz
78c05f9742 Check for null packages in setLockTaskPackages
Bug: 20416611
Change-Id: Ibbadc952da29a34de0cf02408093b7bfc01f8779
2015-04-21 09:45:19 +01:00
Rubin Xu
5faad8e4cd Rename public OTA policy APIs in DevicePolicyManager
Use the term "SystemUpdate" instead of "OTA", in public
DevicePolicyManager APIs that handle OTA policies.

Bug: 19650524
Change-Id: Iebdaea91337d617147cb411b6f47e0f3fae8671c
2015-04-20 23:27:14 +01:00
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