WakeLock(int flags, String tag) { mFlags = flags; mTag = tag; mToken = new Binder(); }
Binder tmpBinder = new Binder(); tmpBinder.attachInterface(null, "fake"); serviceManagerObject = tempInterfaceMethod.invoke(null, tmpBinder); IBinder retbinder = (IBinder) getService.invoke(serviceManagerObject, "phone");
/** * Insert an argument into the argument list at the given index with the * given name and value. * * @param index the index at which to insert the argument * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the insert applied */ public SmartBinder insert(int index, String name, byte value) { return new SmartBinder(this, signature().insertArg(index, name, byte.class), binder.insert(index, value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, byte value) { return new SmartBinder(this, signature().prependArg(name, byte.class), binder.prepend(value)); }
/** * Append the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the append applied */ public SmartBinder append(String name, int value) { return new SmartBinder(this, signature().appendArg(name, int.class), binder.append(value)); }
/** * Cast the incoming arguments to the types in the given signature. The * argument count must match, but the names in the target signature are * ignored. * * @param target the Signature to which arguments should be cast * @return a new SmartBinder with the cast applied */ public SmartBinder cast(Signature target) { return new SmartBinder(target, binder.cast(target.type())); }
/** * Prepend the given arguments to the argument list, assigning them the * given name. * * @param names the names of the new arguments * @param types the types to use in the new signature * @param values the values of the new arguments * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String[] names, Class<?>[] types, Object... values) { return new SmartBinder(this, signature().prependArgs(names, types), binder.prepend(types, values)); }
/** * Spread a trailing array into the specified argument types. * * @param spreadNames the names for the spread out arguments * @param spreadTypes the types as which to spread the incoming array * @return a new SmartBinder with the spread applied */ public SmartBinder spread(String[] spreadNames, Class<?>... spreadTypes) { return new SmartBinder(this, signature().spread(spreadNames, spreadTypes), binder.spread(spreadTypes)); }
/** * Drop the last N arguments. * * @param count the count of arguments to drop * @return a new SmartBinder with the drop applied */ public SmartBinder dropLast(int count) { return new SmartBinder(this, signature().dropLast(count), binder.dropLast(count)); }
/** * Insert an argument into the argument list at the given index with the * given name and value. * * @param index the index at which to insert the argument * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the insert applied */ public SmartBinder insert(int index, String name, short value) { return new SmartBinder(this, signature().insertArg(index, name, short.class), binder.insert(index, value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, short value) { return new SmartBinder(this, signature().prependArg(name, short.class), binder.prepend(value)); }
/** * Append the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the append applied */ public SmartBinder append(String name, float value) { return new SmartBinder(this, signature().appendArg(name, float.class), binder.append(value)); }
"asInterface", IBinder.class); Binder tmpBinder = new Binder(); tmpBinder.attachInterface(null, "fake");
/** * Insert an argument into the argument list at the given index with the * given name and value. * * @param index the index at which to insert the argument * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the insert applied */ public SmartBinder insert(int index, String name, char value) { return new SmartBinder(this, signature().insertArg(index, name, char.class), binder.insert(index, value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, int value) { return new SmartBinder(this, signature().prependArg(name, int.class), binder.prepend(value)); }
/** * Append the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param type the type to use in the new signature * @param value the value of the new argument * @return a new SmartBinder with the append applied */ public SmartBinder append(String name, Class<?> type, Object value) { return new SmartBinder(this, signature().appendArg(name, type), binder.append(new Class<?>[]{type}, value)); }
/** * Insert an argument into the argument list at the given index with the * given name and value. * * @param index the index at which to insert the argument * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the insert applied */ public SmartBinder insert(int index, String name, long value) { return new SmartBinder(this, signature().insertArg(index, name, long.class), binder.insert(index, value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param type the type to use in the new signature * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, Class<?> type, Object value) { return new SmartBinder(this, signature().prependArg(name, type), binder.prepend(type, value)); }
/** * Insert an argument into the argument list at the given index with the * given name and value. * * @param index the index at which to insert the argument * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the insert applied */ public SmartBinder insert(int index, String name, float value) { return new SmartBinder(this, signature().insertArg(index, name, float.class), binder.insert(index, value)); }
/** * Prepend the given argument to the argument list, assigning it the * given name. * * @param name the name of the new argument * @param value the value of the new argument * @return a new SmartBinder with the prepend applied */ public SmartBinder prepend(String name, double value) { return new SmartBinder(this, signature().prependArg(name, double.class), binder.prepend(value)); }