package com.google.android.gms.common.internal; import android.os.IBinder; import android.os.Parcel; import android.os.RemoteException; import androidx.annotation.Nullable; /* loaded from: classes2.dex */ final class zzad implements IGmsServiceBroker { private final IBinder zza; public zzad(IBinder iBinder) { this.zza = iBinder; } @Override // android.os.IInterface public final IBinder asBinder() { return this.zza; } @Override // com.google.android.gms.common.internal.IGmsServiceBroker public final void getService(IGmsCallbacks iGmsCallbacks, @Nullable GetServiceRequest getServiceRequest) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.common.internal.IGmsServiceBroker"); obtain.writeStrongBinder(iGmsCallbacks != null ? iGmsCallbacks.asBinder() : null); if (getServiceRequest != null) { obtain.writeInt(1); zzn.zza(getServiceRequest, obtain, 0); } else { obtain.writeInt(0); } this.zza.transact(46, obtain, obtain2, 0); obtain2.readException(); obtain2.recycle(); obtain.recycle(); } catch (Throwable th) { obtain2.recycle(); obtain.recycle(); throw th; } } }