本文整理汇总了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);
}
示例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));
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}