History log of /frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ed48c8b4f50e060add50ad72a8d7af2fa547885b 18-Oct-2011 Ben Komalo <benkomalo@google.com> Fix remote device wipe to not hang.

The DPM seemed to always go through ExternalStorageFormatter to wipe the
device and SD card. For SD cards emulated on a fuse filesystem, this
seems to fail unless the device is wholly encrypted. Bypass
ExternalStorageFormatter in those cases and just wipe as normal.

Bug: 5458396
Change-Id: Iec759ef894c6bd3863cb4e7329f4de4584c60c1a
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
0191bba17cf78285aa38e0a91acbce112774d348 21-Aug-2011 Jim Miller <jaggies@google.com> Fix 4993068: Don't check password history when dpm sets the password

This fixes a crash caused by permission problems when we try to update
the password history and discover there's no password salt. The code
attempts to create the salt, which triggers the exception.

This could be fixed by wrapping the call with a clearCallingIdentity()/
restoreCallingIdentity(ident). However, while looking at it, it occurred to me
that this can cause unexpected failures if the DPM tries to set the
password twice or happens to set it to something in the password history.

Instead, we should *always* allow the DPM to reset the password to whatever it wants,
provided it passes the minimum password criteria.

Change-Id: I1505b24f9c097ee5c2c44e4bf378ba90095b113b
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
2447edd85baac3225a12b868ef40f76cfdc6ec11 10-May-2011 Ben Komalo <benkomalo@google.com> New device policy to disable camera.

This introduces a new policy that a DeviceAdmin can use to disable _all_
cameras on the device. A separate CL will be made on the media side to
watch this policy bit and act accordingly.

Bug: 4185303
Change-Id: I700cfc4a8317bb74087ccae39346d74467fc58b2
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
61ad43dc1e62a9cfdbc3f6624d9c8b269fc59a44 02-Jun-2011 Dianne Hackborn <hackbod@google.com> am 469465c4: am 0821f274: am 2a108403: I am a dummy.

* commit '469465c45e42c66201639feb49db5421f5843bbe':
I am a dummy.
c994d693b684bcba1a690310b5b2be306074cc02 02-Jun-2011 Andy Stadler <stadler@google.com> Use unchecked admin lookup for getStorageEncryption()

Due to a copy/paste typo, getStorageEncryption() was protected by
getActiveAdminForCallerLocked(), which made the API unreadable if the
caller is not an admin. This doesn't match the rest of the DPM API which
allows the "get" calls to be made anonymously.

This fix supercedes the proposed workaround CL in the DPM ApiDemo sample.

Change-Id: If1a6237634e97ced09a7c6a8876bb6b0f60c9be9
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
2a108403803bd30bee1c019060c208fb8c52c10c 26-May-2011 Dianne Hackborn <hackbod@google.com> I am a dummy.

Change-Id: Ie6908a8931954f83ab0e9b905173b576dbf3661d
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
d998acb3491fe750ce157b6171d5b0a18f4b3883 25-May-2011 Dianne Hackborn <hackbod@google.com> Fix issue #4445007: DPM initializes some values to 1, instead of 0

Also fix not writing the settings file when an admin is removed.

And take care of an old to-do about not removing an admin until
after it has received the broadcast about it being disabled.

Change-Id: I4ebe0ea0461222b65425b2c5438b646b572f18c8
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
6b85768058b065cc682757a366abc828c9ca727a 17-Feb-2011 Jim Miller <jaggies@google.com> Fix 3197205: Minor edits to device policy admin strings and documentation

Change-Id: I3788772c375b916752cd8a98ff5d3751448e4334
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
0fe45dea927dc87c19d6afd4502658b36177aa07 21-Jan-2011 Andy Stadler <stadler@google.com> Read actual device encryption status

Bug: 3346770
Change-Id: Ie70c14b1b4584a5f340a27102145f7860ba9e14b
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
22dbfda976aab9ae897eed0625e2e64ead32bbc4 17-Jan-2011 Andy Stadler <stadler@google.com> Add internal plumbing to DPM for encryption

* Add code to persist per-admin setting
* Add hooks for OS-level tie-in (is supported, get / set status)
* Add 3rd API call to get OS status (irrespective of admin settings)
* Remove "REQUESTED" status, no longer relevant with 3rd API
* Fixed bug that impacted global proxy settings
* Update api/11.xml to match current.xml

Bug: 3346770
Change-Id: I56bdf9a7894f6ca4842402c7b82ddb3caf4b37b9
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
7b0f8f08ac7b3ed5cf462b92283713b033d6a64a 12-Jan-2011 Andy Stadler <stadler@google.com> API changes to support encryption in DPM

* New uses-policies value
* Definitions for storage domain and encryption status
* API to get and set encryption status
* Intent to launch encryption changes
* Both new calls bottom out in the DPM service and are suitable for
a device that does not support encryption.

NOTE: Nobody should use ACTION_START_ENCRYPTION yet. It needs a receiver
to be built in Settings (different CL).

Change-Id: I2ae193bedbec59f6ba46c0ec7de12ecf321e5803
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
c25f70a440ef9468085b8d98c8416c7e8b116753 09-Dec-2010 Andy Stadler <stadler@google.com> API CHANGE - Add hasGrantedPolicy() API

* Allows an app to detect that it needs to have additional policies granted
* Add "refreshing" parameter to setActiveAdmin() to handle this case
* Minor cleanups to eliminate warnings (mostly for unused things)

Bug: 3253179
Change-Id: I4bf639bf560557130bf98e8cfb75f996fac416f1
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
043116a572c2bcb9dad4c264b38e252861fa54b4 30-Nov-2010 Andy Stadler <stadler@google.com> Update device password expiration/alarm behavior

* Change alarm math to snap to multiples of 24h before expiration
* Stop recurring alarm when no expirations upcoming
* Fix small bug in update logic when device password is updated

Change-Id: I31ce147e4f8c766245fae3e286fc50eaee4cfa22
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
1f35d487ba1a5208e66bc960f35f6e1d874fbd1e 20-Nov-2010 Andy Stadler <stadler@google.com> Fixes to DevicePolicyManager.setPasswordExpirationTimeout

* Fix permissions problem in DevicePolicyManager
* Allow short timeouts (primarily for testing)
* Remove unused debugging code

Bug: 3212583
Change-Id: I3770b1c6f090363e8e8d65db92839cd53de05c45
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
434203a277cd2f237a71508a3d5a7d1602126cd5 12-Oct-2010 Robert Greenwalt <rgreenwalt@google.com> Notify all VMs when proxy changes.

bug:2700664
Change-Id: I74cc6e0bd6e66847bf18f524ce851e3e9d2c4e87
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
a4e28d181942018ba8759989799a28fa88764ce3 09-Nov-2010 Jim Miller <jaggies@google.com> Add password expiration support to DevicePolicyManager.

Change-Id: Ib2629ec547c123ac489d7f4cbd4e0a1d4aa07620
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
ab36acb39941ce981dddda9f9cf4d2d23a56fd26 05-Nov-2010 Dianne Hackborn <hackbod@google.com> Fixe some stuff.

Addresses these bugs:

3061847 - With no headers, PreferenceActivity crashes
2888426 - minor typo in DevicePolicyManagerService.ActiveAdmin.writeToXml()
3159155 - IllegalStateException:"Can not perform this action after
onSaveInstanceState" while dismissing a DialogFragment
3155995 - PopupWindow.showAtLocation does not respect LayoutParams

Also tweak the new fragment APIs to use abstract classes instead of
interfaces as base classes.

Change-Id: I9c0b4337fe0e304b737b5f7c2762762372bb3020
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
027610a76e67f39e3a435d68ec785a1cf09dcf9c 18-Oct-2010 Kenny Root <kroot@google.com> resolved conflicts for merge of 964eb438 to master

Change-Id: I0c54d6b88356d8734d7f51234b0114434414502e
424991704b5fb7a64f6cf0fcc3f4b1aabbf2a2e0 16-Oct-2010 Dianne Hackborn <hackbod@google.com> Implement issue #3094621 and #3094609 - wipe sd card

3094621: add "wipe sd card" option to factory data reset
3094609: collapse unmount/format into one command

Also since we have decided that it is important to consider
the Crespo storage as internal storage, DevicePolicyManager
gets a new API to be able to wipe it. (No big deal, since
all of the work for this is now done in the implementation
of the new UI.)

Change-Id: I32a77c410f710a87dcdcbf6586c09bd2e48a8807
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
dc71b9e4d67327065a992924a021cad4bc100fa2 01-Oct-2010 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 6a3eddb4 to master

Change-Id: I1ca1d100274d4a733ef2bf58b0d5d7217b4f858e
cef65eeb0315c3118bf8860d6f723cb49ff6bc52 01-Oct-2010 Dianne Hackborn <hackbod@google.com> Rub in a little 'ol log-b-gone.

Mmmmmm... great fresh scent!

Change-Id: I050e70b31b5d4a9c6731f15a4b51a3620a33a78d
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
69238c6a37ae43c748ad9cd7613f2209149ee7da 03-Aug-2010 Oscar Montemayor <oam@google.com> Device Policy Manager changes to enable Global Proxy.

Change-Id: I8489df7d28e4c5312e10d5cecc8e2a182413a034
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
c857740f242169f2ca7fd42f0d1268661b399ad6 05-Jun-2010 Konstantin Lopyrev <klopyrev@google.com> Adding support for minimum number of non letter characters.

Change-Id: If54cb7209d65eef826d474d7e0dbbef63d2f2b47
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
1a0ce1cc6f6bda7ef7345b20860bc0c8cd3d8451 09-Jun-2010 Jim Miller <jaggies@google.com> am db603bb5: am 3b68548d: am 75b6a6b9: Merge "Fix 2737842: Disable KeguardManager API if device policy is enabled" into froyo
284b62e1b8c3419bfd02c6fea5ba0a68146c06f8 08-Jun-2010 Jim Miller <jaggies@google.com> Fix 2737842: Disable KeguardManager API if device policy is enabled

This change adds notification to find out when the device policy
has changed. When an admin adds or changes a policy, we get notified
and reset the state of keyguard to be enabled.

It also moves disabling keyguard into the TokenWatcher.acquired()
method to avoid disabling keyguard when a policy doesn't permit it.
This avoids reference counting issues in TokenWatcher and hence relieves
the ordering issue.

There is one remaining caveat. An application that uses KeyguardManager
to disable keyguard will need to disable keyguard again after any
policy change.

Tested:

Install and run app that disables keyguard with no admin. Result: keyguard is enabled/disabled as expected.
Enable admin and set quality = "something" after installing & running app. Result: keyguard is enabled.
Change admin password quality to "unspecified" and re-run app (per caveat). Result: keyguard is disabled.
Change admin password quality to "something" again. Result: keyguard is enabled.
Disable admin : Result: keyguard is enabled until app runs again (per caveat).

Added minor cosmetic changes after review.

Change-Id: I302f2b01446bf031f746b0f3e8b5fd7a6cc0e648
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
a15dcfaf2bc7cbd13b30db6766afe3bbaa01db97 25-May-2010 Konstantin Lopyrev <klopyrev@google.com> Fix 2677197: Adding minimum complex character support.

Change-Id: I520bc5f9aa924bf9b5585b2235a91cc96cb99c25
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
3255823de062e981f7bfc7994919207988697e45 21-May-2010 Konstantin Lopyrev <klopyrev@google.com> Fix 2673731: Adding support for password history to Device Admin.

Change-Id: If3240048813e32b2bae79fe5cb8a73aea20ec56c
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
85f2c9ce5a0e074df2429a5d66e1754e368a0430 22-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2530103: ActivePassword data in Device Policy Manager needs to be persisted

Also fixes how the quality vs. mode is handled to be more consistent, which also
required introducing a new "alphabetic" quality since it is possible for the user
to enter such a password.

The current password quality and length is stored in the DPM, since at boot it
couldn't figure this out from the stored password.

Change-Id: I519d9b76dd0b4431bcf42920c34dda38c9f1136e
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
1afd1c90ebe789b8d3a137004127a50d2db7e3b5 19-Mar-2010 Dianne Hackborn <hackbod@google.com> Maybe fix issue #2457218: Corrupt batterystats.bin file preventing phone boot - LIBtt68127

No steps to repro, but makes the code more robust by using the standard
JournaledFile class and doing sanity checks on the input it reads.

This required moving the JournaledFile class in to the framework (and
we really should get rid of either it or AtomicFile, but they have
different recovery semantics so that is tough). Also went through and
cleaned up the file management in various places.

Change-Id: Ieb7268d8435e77dff66b6e67bb63b62e5dea572e
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
87bba1ee14279bb14a28d42e27c4ef66d9967bf8 27-Feb-2010 Dianne Hackborn <hackbod@google.com> Move DeviceAdmin APIs to android.app.admin.

Also add ability for admins to hide themselves when not in use,
a facility for admins to not allow other admins to reset
their password, and debug dumping.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
2269d1572e5fcfb725ea55f5764d8c3280d69f6d 25-Feb-2010 Dianne Hackborn <hackbod@google.com> Re-arrange android-common so framework no longer links with it.

This is the framework part, moving classes around so the framework
no longer needs to link to android-common. Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
21f1bd17b2dfe361acbb28453b3f3b1a110932fa 20-Feb-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2438980: Implement package watcher for voice recognizer service setting

I am getting tired of writing package monitor code, realized this is missing in
a number of places, and at this point it has gotten complicated enough that I
don't think anyone actually does it 100% right so:

Introducing PackageMonitor.

Yes there are no Java docs. I am still playing around with just what this
thing is to figure out what makes sense and how people will use it. It is
being used to fix this bug for monitoring voice recognizers (integrating the
code from the settings provider for setting an initial value), to replace
the existing code for monitoring input methods (and fix the bug where we
wouldn't remove an input method from the enabled list when it got
uninstalled), to now monitor live wallpaper package changes (now allowing
us to avoid reverting back to the default live wallpaper when the current
one is updated!), and to monitor device admin changes.

Also includes a fix so you can't uninstall an .apk that is currently enabled
as a device admin.

Also includes a fix where the default time zone was not initialized early
enough which should fix issue #2455507 (Observed Google services frame work crash).

In addition, this finally introduces a mechanism to determine if the
"force stop" button should be enabled, with convenience in PackageMonitor
for system services to handle it. All services have been updated to support
this. There is also new infrastructure for reporting battery usage as an
applicatin error report.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
ef6b22fc04a8d5ab26e13efac8069c097e0da7c9 17-Feb-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2420412: API review: DeviceAdmin API changes

Note in docs that callbacks are on main thread.
Rename to DeviceAdminReceiver?
Document resetPassword is the device's password.

Also hide android.R.attr.neverEncrypt.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
315ada7fbb9e967c22e87b4921bec720ceb2c73c 11-Feb-2010 Dianne Hackborn <hackbod@google.com> Get rid of the limit-unlock policy control.

This is merged with force-lock. These both allow effectively the same thing,
so there is no reason to junk up the user experience with them as separate
entities.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
e83cefcef07f9ac025642c1ffec76b4c7ab39cf2 05-Feb-2010 Dianne Hackborn <hackbod@google.com> New external storage APIs.

This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
9327f4f671de3cbb795612bf4f314ceff88de865 29-Jan-2010 Dianne Hackborn <hackbod@google.com> More device policy work: clarify password modes, monkeying.

Clarifies what the password modes mean, renaming them to "quality"
and updating their documentation and the implementation to follow.

Also adds a facility to find out if a monkey is running, which I
need for the api demo to avoid letting it wipe the device.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
254cb446faa7cb13699d8150eb4cc4f44cb61a2d 28-Jan-2010 Dianne Hackborn <hackbod@google.com> More device admin.

- Clean up device policy manager APIs.
- Implement lockNow(). For now this just turns the screen off to lock the device.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
d47c6ed4a9f2b5bd31f6c806b74701428efe458b 28-Jan-2010 Dianne Hackborn <hackbod@google.com> Bite the bullet and add support for multiple device admins.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
8ea138cbf12b140d43fd81f4f12fe1a9234f1f25 27-Jan-2010 Dianne Hackborn <hackbod@google.com> More work on device admins:

- You can now show a dynamic message to the user when asking to
have your DeviceAdmin added.
- A DeviceAdmin can now provide a warning message that is displayed
before a user disables it.
- Better ordering (and text) of the policy warnings.
- New API to set the maximum failed password attempts before the device
wipes itself.
- We now store the number of failed unlock attempts in persistent
storage.
- New managed dialog APIs that will be used by the settings app.

Also a little bit of cleanup as I was working on this - removed the
long unused MailboxNotAvailableException, fixed a java doc in Messenger.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
8aa2e8939c61d788cbc192098465e79f584e173a 22-Jan-2010 Dianne Hackborn <hackbod@google.com> More device admin work: description, policy control.

There is now a description attribute associated with all components,
that can supply user-visible information about what the component does.
We use this to show such information about device admins, and wallpapers
are also updated to be able to show this in addition to the existing
description in their meta-data.

This also defines security control for admins, requiring that they
declare the policies they will touch, and enforcing that they do
so to be able to use various APIs.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
4141d035c7d41f39f023d7a051568dff87c7cd32 22-Jan-2010 Dianne Hackborn <hackbod@google.com> Don't crash when there is no admin.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
df83afaf299666e99c519aa86e7e082b7c116e95 20-Jan-2010 Dianne Hackborn <hackbod@google.com> More device policy manager / admin work.

Update API with some new features, re-arrange how you check for valid
passwords, and start hooking up the back-end implementation.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java
d68478467e3f837511196c80891d7245d0e163df 13-Jan-2010 Dianne Hackborn <hackbod@google.com> First pass at new device policy and administration APIs.

This adds new DevicAdmin, DevicePolicyManager, and DeviceAdminInfo classes.
See the java docs for each on documentation on them. Basically: a DeviceAdmin
is what you derive from to administer a device; DevicePolicyManager is what you
use to apply and check your policy requirements and perform other administration
tasks.
/frameworks/base/services/java/com/android/server/DevicePolicyManagerService.java