|
|
@ -171,7 +171,7 @@ public class MpMasterService extends Service {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public IBinder onBind(Intent intent) {
|
|
|
|
public IBinder onBind(Intent intent) {
|
|
|
|
// TODO: Return the communication channel to the service.
|
|
|
|
// TODO: Return the communication channel to the service.
|
|
|
|
// throw new UnsupportedOperationException("Not yet implemented");
|
|
|
|
throw new UnsupportedOperationException("Not yet implemented");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -658,6 +658,10 @@ public class MpMasterService extends Service {
|
|
|
|
|
|
|
|
|
|
|
|
public void processAction(final Context context, final Intent intent) {
|
|
|
|
public void processAction(final Context context, final Intent intent) {
|
|
|
|
String action = intent.getAction();
|
|
|
|
String action = intent.getAction();
|
|
|
|
|
|
|
|
mService.logger.info("测试读取电压开始:");
|
|
|
|
|
|
|
|
String batteryVoltage = getBatteryVoltage();
|
|
|
|
|
|
|
|
mService.logger.info("测试读取电压结束:"+batteryVoltage);
|
|
|
|
|
|
|
|
|
|
|
|
if (TextUtils.equals(ACTION_HEARTBEAT, action)) {
|
|
|
|
if (TextUtils.equals(ACTION_HEARTBEAT, action)) {
|
|
|
|
boolean keepAlive = intent.getBooleanExtra("keepAlive", false);
|
|
|
|
boolean keepAlive = intent.getBooleanExtra("keepAlive", false);
|
|
|
|
if (keepAlive) {
|
|
|
|
if (keepAlive) {
|
|
|
|