Android Open Source - robattery Battery Service Binder






From Project

Back to project page robattery.

License

The source code is released under:

GNU General Public License

If you think the Android project robattery listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 *  Copyright (C) 2009-2010    John Reese, LeetCode.net
 *//from w ww  .j  a  v  a2s. c om
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package net.leetcode.robattery;

import android.os.Binder;
import android.os.Parcel;
import android.util.Log;

public class BatteryServiceBinder extends Binder {
  private final String LOGCAT = "RobatteryBinder";
  private BatteryService service = null;
  
  public BatteryServiceBinder( BatteryService service ) {
    super();
    this.service = service;    
  }
  
  @Override
  public boolean onTransact(int code, Parcel data, Parcel reply, int flags) {
    Log.d(LOGCAT,"onTransact");
    
    reply.writeBundle(service.getStatus().bundle());
    
    return true;
  }

}




Java Source Code List

net.leetcode.robattery.BatteryServiceBinder.java
net.leetcode.robattery.BatteryService.java
net.leetcode.robattery.Battery.java
net.leetcode.robattery.BootReceiver.java
net.leetcode.robattery.Notify.java
net.leetcode.robattery.Robattery.java
net.leetcode.robattery.Settings.java
net.leetcode.robattery.WidgetProvider.java