当前位置: 首页>>代码示例>>Java>>正文


Java IBinder.queryLocalInterface方法代码示例

本文整理汇总了Java中android.os.IBinder.queryLocalInterface方法的典型用法代码示例。如果您正苦于以下问题:Java IBinder.queryLocalInterface方法的具体用法?Java IBinder.queryLocalInterface怎么用?Java IBinder.queryLocalInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.IBinder的用法示例。


在下文中一共展示了IBinder.queryLocalInterface方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: factory

import android.os.IBinder; //导入方法依赖的package包/类
public static IBinder factory(Context context, String name, IBinder binder) {
    String descriptor = null;
    try {
        descriptor = binder.getInterfaceDescriptor();
    } catch (RemoteException e) {
        if (DEBUG) {
            Log.d(TAG, "getInterfaceDescriptor()", e);
        }
    }
    android.os.IInterface iin = binder.queryLocalInterface(descriptor);
    if (iin != null) {
        /**
         * If the requested interface has local implementation, meaning that
         * it's living in the same process as the one who requests for it,
         * return the binder directly since in such cases our wrapper does
         * not help in any way.
         */
        return binder;
    }
    return new ServiceWrapper(context, name, binder);
}
 
开发者ID:wangyupeng1-iri,项目名称:springreplugin,代码行数:22,代码来源:ServiceWrapper.java

示例2: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static ICustomTabsCallback asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    } else {
        IInterface iin = obj.queryLocalInterface("android.support.customtabs.ICustomTabsCallback");
        return (iin != null && iin instanceof ICustomTabsCallback ? (ICustomTabsCallback) iin : new ICustomTabsCallback.Stub.Proxy(obj));
    }
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:9,代码来源:ICustomTabsCallback.java

示例3: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static IXiaomiAuthService asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof IXiaomiAuthService)) {
        return new Proxy(obj);
    }
    return (IXiaomiAuthService) iin;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:IXiaomiAuthService.java

示例4: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static IApkManager asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof IApkManager)) {
        return new Proxy(obj);
    }
    return (IApkManager) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:IApkManager.java

示例5: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static INotificationSideChannel asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof INotificationSideChannel)) {
        return new Proxy(obj);
    }
    return (INotificationSideChannel) iin;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:INotificationSideChannel.java

示例6: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static RemoteDeviceManager asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof RemoteDeviceManager)) {
        return new Proxy(obj);
    }
    return (RemoteDeviceManager) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:RemoteDeviceManager.java

示例7: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static DeviceCallback asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof DeviceCallback)) {
        return new Proxy(obj);
    }
    return (DeviceCallback) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:DeviceCallback.java

示例8: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static ICdeBinder asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof ICdeBinder)) {
        return new Proxy(obj);
    }
    return (ICdeBinder) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:ICdeBinder.java

示例9: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static AIDLService asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof AIDLService)) {
        return new Proxy(obj);
    }
    return (AIDLService) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:AIDLService.java

示例10: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static AIDLActivity asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof AIDLActivity)) {
        return new Proxy(obj);
    }
    return (AIDLActivity) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:AIDLActivity.java

示例11: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static ITmsCallback asInterface(IBinder binder) {
    if (binder == null) {
        return null;
    }
    IInterface iInterface = binder.queryLocalInterface(ITmsCallback.DESCRIPTOR);
    if (iInterface == null || !(iInterface instanceof ITmsCallback)) {
        return new TmsCallbackProxy(binder);
    }
    return (ITmsCallback) iInterface;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:TmsCallbackStub.java

示例12: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static IRubbishScanListener asInterface(IBinder binder) {
    if (binder == null) {
        return null;
    }
    IInterface iInterface = binder.queryLocalInterface(DESCRIPTOR);
    if (iInterface == null || !(iInterface instanceof IRubbishScanListener)) {
        return new RubbishScanListenerProxy(binder);
    }
    return (IRubbishScanListener) iInterface;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:RubbishScanListenerStub.java

示例13: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static IResultReceiver asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof IResultReceiver)) {
        return new Proxy(obj);
    }
    return (IResultReceiver) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:IResultReceiver.java

示例14: asInterface

import android.os.IBinder; //导入方法依赖的package包/类
public static IMediaControllerCallback asInterface(IBinder obj) {
    if (obj == null) {
        return null;
    }
    IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
    if (iin == null || !(iin instanceof IMediaControllerCallback)) {
        return new Proxy(obj);
    }
    return (IMediaControllerCallback) iin;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:IMediaControllerCallback.java

示例15: a

import android.os.IBinder; //导入方法依赖的package包/类
public static b a(IBinder iBinder) {
    if (iBinder == null) {
        return null;
    }
    IInterface queryLocalInterface = iBinder.queryLocalInterface(z);
    return (queryLocalInterface == null || !(queryLocalInterface instanceof b)) ? new d(iBinder) : (b) queryLocalInterface;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:8,代码来源:c.java


注:本文中的android.os.IBinder.queryLocalInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。