OSDN Git Service

Fix AccountManagerServiceTest
authorFyodor Kupolov <fkupolov@google.com>
Thu, 25 Aug 2016 22:09:22 +0000 (15:09 -0700)
committerFyodor Kupolov <fkupolov@google.com>
Fri, 26 Aug 2016 00:27:05 +0000 (00:27 +0000)
commitd9543578609c6035aa97844b45143a2ce6ff1bfe
tree2685b0efe64d9de09c7813fcf2a63bd37b6b1e62
parent5d146ccdb8c5adad9a80f1d0d8563d18e5629411
Fix AccountManagerServiceTest

Unregister AccountManagerInternal before creating a new instance of
AccountManagerService, otherwise it will cause:
java.lang.IllegalStateException: Overriding service registration

Also overrode MockPm.addOnPermissionsChangeListener to be a noop and
not throw an exception.

Bug: 31071079
Change-Id: I0d24232eba655a68bf3fb38d7aa9edb92d469cea
services/tests/servicestests/src/com/android/server/accounts/AccountManagerServiceTest.java