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

Commit e000aac3 authored by Parth Sane's avatar Parth Sane
Browse files

Resolve change in getService return type

Flag: RELEASE_LIBBINDER_REMOVE_STATIC_LIST
Bug: 333854840
Test: atest binderCacheUnitTest
Change-Id: I552381ef778bc6c2c0d9db012b74c554d5c2d29c
parent 1bf8d3aa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -277,7 +277,8 @@ public final class ServiceManager {
            if (service != null) {
                return service;
            } else {
                return Binder.allowBlocking(getIServiceManager().checkService(name).getBinder());
                return Binder.allowBlocking(
                        getIServiceManager().checkService(name).getServiceWithMetadata().service);
            }
        } catch (RemoteException e) {
            Log.e(TAG, "error in checkService", e);
@@ -425,7 +426,8 @@ public final class ServiceManager {
    private static IBinder rawGetService(String name) throws RemoteException {
        final long start = sStatLogger.getTime();

        final IBinder binder = getIServiceManager().getService2(name).getBinder();
        final IBinder binder =
                getIServiceManager().getService2(name).getServiceWithMetadata().service;

        final int time = (int) sStatLogger.logDurationStat(Stats.GET_SERVICE, start);

+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ class ServiceManagerProxy implements IServiceManager {
    @UnsupportedAppUsage
    public IBinder getService(String name) throws RemoteException {
        // Same as checkService (old versions of servicemanager had both methods).
        return checkService(name).getBinder();
        return checkService(name).getServiceWithMetadata().service;
    }

    public Service getService2(String name) throws RemoteException {