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

Commit cb086de6 authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "[java] Restore ServiceManager#getService() to return IBinder" into main

parents 384b3415 39e09ae2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ public final class ServiceManager {
    private static IBinder rawGetService(String name) throws RemoteException {
        final long start = sStatLogger.getTime();

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

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

+7 −1
Original line number Diff line number Diff line
@@ -57,8 +57,14 @@ class ServiceManagerProxy implements IServiceManager {
        return mRemote;
    }

    // TODO(b/355394904): This function has been deprecated, please use getService2 instead.
    @UnsupportedAppUsage
    public Service getService(String name) throws RemoteException {
    public IBinder getService(String name) throws RemoteException {
        // Same as checkService (old versions of servicemanager had both methods).
        return checkService(name).getBinder();
    }

    public Service getService2(String name) throws RemoteException {
        // Same as checkService (old versions of servicemanager had both methods).
        return checkService(name);
    }