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

Commit 9124b479 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

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

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3196256



Change-Id: Id5892e59a79e95ac5919449012fa05bd799efbaa
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 14427b11 f069c2c6
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);
    }