IBinder源码:

package android.os;import android.annotation.NonNull;import android.annotation.Nullable;import java.io.FileDescriptor;public interface IBinder {    /**     * The first transaction code available for user commands.     */    int FIRST_CALL_TRANSACTION  = 0x00000001;    /**     * The last transaction code available for user commands.     */    int LAST_CALL_TRANSACTION   = 0x00ffffff;        /**     * IBinder protocol transaction code: pingBinder().     */    int PING_TRANSACTION        = ('_'<<24)|('P'<<16)|('N'<<8)|'G';        /**     * IBinder protocol transaction code: dump internal state.     */    int DUMP_TRANSACTION        = ('_'<<24)|('D'<<16)|('M'<<8)|'P';        /**     * IBinder protocol transaction code: execute a shell command.     * @hide     */    int SHELL_COMMAND_TRANSACTION = ('_'<<24)|('C'<<16)|('M'<<8)|'D';    /**     * IBinder protocol transaction code: interrogate the recipient side     * of the transaction for its canonical interface descriptor.     */    int INTERFACE_TRANSACTION   = ('_'<<24)|('N'<<16)|('T'<<8)|'F';    int TWEET_TRANSACTION   = ('_'<<24)|('T'<<16)|('W'<<8)|'T';    int LIKE_TRANSACTION   = ('_'<<24)|('L'<<16)|('I'<<8)|'K';    /** @hide */    int SYSPROPS_TRANSACTION = ('_'<<24)|('S'<<16)|('P'<<8)|'R';    int FLAG_ONEWAY             = 0x00000001;    public static final int MAX_IPC_SIZE = 64 * 1024;    public @Nullable String getInterfaceDescriptor() throws RemoteException;    public boolean pingBinder();    public boolean isBinderAlive();    public @Nullable IInterface queryLocalInterface(@NonNull String descriptor);    public void dump(@NonNull FileDescriptor fd, @Nullable String[] args) throws     RemoteException;    public void dumpAsync(@NonNull FileDescriptor fd, @Nullable String[] args)            throws RemoteException;    public void shellCommand(@Nullable FileDescriptor in, @Nullable FileDescriptor out,            @Nullable FileDescriptor err,            @NonNull String[] args, @Nullable ShellCallback shellCallback,            @NonNull ResultReceiver resultReceiver) throws RemoteException;    public boolean transact(int code, @NonNull Parcel data, @Nullable Parcel reply, int flags)        throws RemoteException;    public interface DeathRecipient {        public void binderDied();    }    public void linkToDeath(@NonNull DeathRecipient recipient, int flags)            throws RemoteException;    public boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags);}
Binder源码:

public class Binder implements IBinder {    /*     * Set this flag to true to detect anonymous, local or member classes     * that extend this Binder class and that are not static. These kind     * of classes can potentially create leaks.     */    private static final boolean FIND_POTENTIAL_LEAKS = false;    /** @hide */    public static final boolean CHECK_PARCEL_SIZE = false;    static final String TAG = "Binder";    /** @hide */    public static boolean LOG_RUNTIME_EXCEPTION = false; // DO NOT SUBMIT WITH TRUE    /**     * Control whether dump() calls are allowed.     */    private static volatile String sDumpDisabled = null;

 

 

 

 

更多相关文章

  1. android练习一之获取网页源码
  2. Android(安卓)Setting中添加解除屏幕锁选项
  3. Android常用的工具类
  4. 近百个Android优秀开源项目,覆盖Android开发的每个领域
  5. Android常用的工具类
  6. Android(安卓)手电筒源码
  7. Android测试之Monkey原理及源码分析(二)
  8. Android(安卓)ServiceManager源码(一)-- C语言部分
  9. Android全部源码导入Eclipse

随机推荐

  1. Spring Cloud(Greenwich版)-04-Spring Clou
  2. 软件架构-分布式系列并发编程atomic&coll
  3. AWS 大数据实战 - 环境准备(一)
  4. flea-frame-auth使用之角色权限设计初识
  5. 翻译:《实用的Python编程》01_01_Python
  6. Spring Cloud(Greenwich版)-05-Spring Clou
  7. SpringBoot 配置文件绑定到 javabean
  8. 基于数组或链表实现Map
  9. Spring Boot + Vue3 前后端分离 实战wiki
  10. 7.1 Ansible 动态获取主机清单