Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90235274 authored by Danning Chen's avatar Danning Chen Committed by Android (Google) Code Review
Browse files

Merge "Fix the SecurityException in PeopleServiceTest"

parents e2cb02d5 80e5830e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -74,7 +74,14 @@ public class PeopleService extends SystemService {

    @Override
    public void onStart() {
        onStart(/* isForTesting= */ false);
    }

    @VisibleForTesting
    protected void onStart(boolean isForTesting) {
        if (!isForTesting) {
            publishBinderService(Context.PEOPLE_SERVICE, mService);
        }
        publishLocalService(PeopleServiceInternal.class, new LocalService());
    }

+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public final class PeopleServiceTest {
        when(mCallback.asBinder()).thenReturn(new Binder());

        PeopleService service = new PeopleService(mContext);
        service.onStart();
        service.onStart(/* isForTesting= */ true);

        mServiceInternal = LocalServices.getService(PeopleServiceInternal.class);
        mLocalService = (PeopleService.LocalService) mServiceInternal;