History log of /frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTestable.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
623999185029a2c5baf29efe4ebdcbcdebcca294 11-Jan-2016 Esteban Talavera <etalavera@google.com> Add additional APIs supported work on the parent DPM instance

Bug: 22543972
Change-Id: I05061e34d120c64d5c49ca6b7b4014d7dadb68f4
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTestable.java
d932f7689d799b07a6776bc7c59749f672528239 30-Sep-2015 Makoto Onuki <omakoto@google.com> Refactor DPMS tests to be able to test more different cases.

- DpmMockContext.addUser() allows to create more users. This will set up
UserManager properly and create a data directory.

- Updated DevicePolicyManagerTest so it can now easily emulate calls from
different secondary users.

Change-Id: Ic9d3e8d0d1e7f41e184c82e6dc323c244535b8d8
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTestable.java
cc4bbeb76af92a8484fe05f37c4ff412b4c47ccc 17-Sep-2015 Makoto Onuki <omakoto@google.com> Make DPM/DPMS unit-testable

- Now all services that DPMS uses are injectable.
- Introduce some wrappers to make static methods and final class mockable.
(e.g. for Binder.getCallingUid())

- In unit tests we replace those with Mockito mocks, except we use a partial
mock for PackageManager, because we use way too many methods of this and
most of them are okay to use directly.

- To install a partial mock to PackageManager, I needed to make
ApplicationPackageManager @hide public non-final.

- For a starter, added tests for DPM.setAmin().

Bug 24061108

Change-Id: I2afd51d8bc0038992d5f9be38c686260be775b75
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTestable.java