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


Java Parcel.writeStrongBinder方法代码示例

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


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

示例1: managedSelf

import android.os.Parcel; //导入方法依赖的package包/类
private void managedSelf(String packageName) {
	
	log("managedSelf package name = " + packageName);
	
	Parcel data = Parcel.obtain();
	data.writeString(packageName);
	data.writeStrongBinder(this);
	
	Parcel reply = Parcel.obtain();
	
	try {
		mRemoteServiceManager.transact(ServiceContext.MANAGED_CLIENT_SIVMGR, data, reply, 0);
	} catch (RemoteException e) {
		e.printStackTrace();
		log("managedSelf exception");
	}finally {
		data.recycle();
		reply.recycle();
	}
	
}
 
开发者ID:devyok,项目名称:DroidIPC,代码行数:22,代码来源:ServiceManagerImpl.java

示例2: updateVisuals

import android.os.Parcel; //导入方法依赖的package包/类
public boolean updateVisuals(ICustomTabsCallback callback, Bundle bundle) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    boolean _result;
    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
        _data.writeStrongBinder(callback != null ? callback.asBinder() : null);
        if (bundle != null) {
            _data.writeInt(1);
            bundle.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(6, _data, _reply, 0);
        _reply.readException();
        _result = 0 != _reply.readInt();
    } finally {
        _reply.recycle();
        _data.recycle();
    }

    return _result;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:26,代码来源:ICustomTabsService.java

示例3: executeService

import android.os.Parcel; //导入方法依赖的package包/类
private void executeService(int jobId) {
    Intent intent = new Intent(GcmJobService.ACTION_EXECUTE);
    intent.putExtra(GcmIntentParser.BUNDLE_KEY_TAG, String.valueOf(jobId));
    intent.putExtra(GcmIntentParser.BUNDLE_KEY_EXTRAS, Bundle.EMPTY);
    Parcel parcel = Parcel.obtain();
    try {
        parcel.writeStrongBinder(new Binder());
        parcel.setDataPosition(0);
        intent.putExtra(GcmIntentParser.BUNDLE_KEY_CALLBACK, new PendingCallback(parcel));
    } finally {
        parcel.recycle();
    }
    service.onStartCommand(intent, 0, 0);
}
 
开发者ID:Doist,项目名称:JobSchedulerCompat,代码行数:15,代码来源:GcmJobServiceTest.java

示例4: unregisterCallback

import android.os.Parcel; //导入方法依赖的package包/类
public final void unregisterCallback(IRemoteServiceCallback iRemoteServiceCallback) throws RemoteException {
    Parcel obtain = Parcel.obtain();
    Parcel obtain2 = Parcel.obtain();
    try {
        obtain.writeInterfaceToken(Stub.DESCRIPTOR);
        obtain.writeStrongBinder(iRemoteServiceCallback != null ? iRemoteServiceCallback.asBinder() : null);
        this.a.transact(4, obtain, obtain2, 0);
        obtain2.readException();
    } finally {
        obtain2.recycle();
        obtain.recycle();
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:14,代码来源:IAlixPay.java

示例5: mayLaunchUrl

import android.os.Parcel; //导入方法依赖的package包/类
public boolean mayLaunchUrl(ICustomTabsCallback callback, Uri url, Bundle extras, List<Bundle> otherLikelyBundles) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    boolean _result;
    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
        _data.writeStrongBinder(callback != null ? callback.asBinder() : null);
        if (url != null) {
            _data.writeInt(1);
            url.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        if (extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        _data.writeTypedList(otherLikelyBundles);
        this.mRemote.transact(4, _data, _reply, 0);
        _reply.readException();
        _result = 0 != _reply.readInt();
    } finally {
        _reply.recycle();
        _data.recycle();
    }

    return _result;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:34,代码来源:ICustomTabsService.java

示例6: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.mType);
    dest.writeByte(this.mOrderedHint ? (byte) 1 : (byte) 0);
    dest.writeByte(this.mInitialStickyHint ? (byte) 1 : (byte) 0);
    dest.writeStrongBinder(this.mToken);
    dest.writeInt(this.mSendingUser);
    dest.writeInt(this.mFlags);
    dest.writeInt(this.mResultCode);
    dest.writeString(this.mResultData);
    dest.writeBundle(this.mResultExtras);
    dest.writeByte(this.mAbortBroadcast ? (byte) 1 : (byte) 0);
    dest.writeByte(this.mFinished ? (byte) 1 : (byte) 0);
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:15,代码来源:PendingResultData.java

示例7: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
    info.writeToParcel(dest, 0);
    if (provider != null) {
        dest.writeStrongBinder(provider.asBinder());
    } else {
        dest.writeStrongBinder(null);
    }
    dest.writeStrongBinder(connection);
    dest.writeInt(noReleaseNeeded ? 1:0);
}
 
开发者ID:alibaba,项目名称:atlas,代码行数:12,代码来源:IActivityManager.java

示例8: registerDeviceCallback

import android.os.Parcel; //导入方法依赖的package包/类
public void registerDeviceCallback(String deviceId, DeviceCallback callback, int events) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        _data.writeString(deviceId);
        _data.writeStrongBinder(callback != null ? callback.asBinder() : null);
        _data.writeInt(events);
        this.mRemote.transact(5, _data, _reply, 0);
        ExceptionUtils.readExceptionFromParcel(_reply);
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:16,代码来源:RemoteDeviceManager.java

示例9: registerCallbackListener

import android.os.Parcel; //导入方法依赖的package包/类
public void registerCallbackListener(IMediaControllerCallback cb) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        _data.writeStrongBinder(cb != null ? cb.asBinder() : null);
        this.mRemote.transact(3, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:14,代码来源:IMediaSession.java

示例10: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
public void writeToParcel(Parcel dest, int flags) {
    if (VERSION.SDK_INT >= 21) {
        dest.writeParcelable((Parcelable) this.mInner, flags);
    } else {
        dest.writeStrongBinder((IBinder) this.mInner);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:8,代码来源:MediaSessionCompat.java

示例11: readPendingIntent

import android.os.Parcel; //导入方法依赖的package包/类
public static PendingIntent readPendingIntent(IBinder binder) {
    Parcel parcel = Parcel.obtain();
    parcel.writeStrongBinder(binder);
    parcel.setDataPosition(0);
    try {
        return PendingIntent.readPendingIntentOrNullFromParcel(parcel);
    } finally {
        parcel.recycle();
    }
}
 
开发者ID:codehz,项目名称:container,代码行数:11,代码来源:PendingIntentData.java

示例12: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
public void writeToParcel(Parcel out, int flags) {
    synchronized (this) {
        if (this.mReceiver == null) {
            this.mReceiver = new MyResultReceiver();
        }
        out.writeStrongBinder(this.mReceiver.asBinder());
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:9,代码来源:ResultReceiver.java

示例13: unregisterCallbackListener

import android.os.Parcel; //导入方法依赖的package包/类
public void unregisterCallbackListener(IMediaControllerCallback cb) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        _data.writeStrongBinder(cb != null ? cb.asBinder() : null);
        this.mRemote.transact(4, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:IMediaSession.java

示例14: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeStrongBinder(mBinder);
}
 
开发者ID:devyok,项目名称:IPCServiceManager,代码行数:5,代码来源:BinderParcel.java


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