add noteResetVideo/Audio to IBatteryStats
Bug: 12979595 Change-Id: Ida474e539a3af0a85ec157a66bbf986430c8020e
This commit is contained in:
parent
45e695a248
commit
2cbba477be
@ -34,6 +34,8 @@ public:
|
|||||||
virtual void noteStopVideo(int uid) = 0;
|
virtual void noteStopVideo(int uid) = 0;
|
||||||
virtual void noteStartAudio(int uid) = 0;
|
virtual void noteStartAudio(int uid) = 0;
|
||||||
virtual void noteStopAudio(int uid) = 0;
|
virtual void noteStopAudio(int uid) = 0;
|
||||||
|
virtual void noteResetVideo() = 0;
|
||||||
|
virtual void noteResetAudio() = 0;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NOTE_START_SENSOR_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
|
NOTE_START_SENSOR_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
|
||||||
@ -42,6 +44,8 @@ public:
|
|||||||
NOTE_STOP_VIDEO_TRANSACTION,
|
NOTE_STOP_VIDEO_TRANSACTION,
|
||||||
NOTE_START_AUDIO_TRANSACTION,
|
NOTE_START_AUDIO_TRANSACTION,
|
||||||
NOTE_STOP_AUDIO_TRANSACTION,
|
NOTE_STOP_AUDIO_TRANSACTION,
|
||||||
|
NOTE_RESET_VIDEO_TRANSACTION,
|
||||||
|
NOTE_RESET_AUDIO_TRANSACTION,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,6 +77,18 @@ public:
|
|||||||
data.writeInt32(uid);
|
data.writeInt32(uid);
|
||||||
remote()->transact(NOTE_STOP_AUDIO_TRANSACTION, data, &reply);
|
remote()->transact(NOTE_STOP_AUDIO_TRANSACTION, data, &reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void noteResetVideo() {
|
||||||
|
Parcel data, reply;
|
||||||
|
data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
|
||||||
|
remote()->transact(NOTE_RESET_VIDEO_TRANSACTION, data, &reply);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void noteResetAudio() {
|
||||||
|
Parcel data, reply;
|
||||||
|
data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
|
||||||
|
remote()->transact(NOTE_RESET_AUDIO_TRANSACTION, data, &reply);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_META_INTERFACE(BatteryStats, "com.android.internal.app.IBatteryStats");
|
IMPLEMENT_META_INTERFACE(BatteryStats, "com.android.internal.app.IBatteryStats");
|
||||||
@ -131,6 +143,18 @@ status_t BnBatteryStats::onTransact(
|
|||||||
reply->writeNoException();
|
reply->writeNoException();
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
} break;
|
} break;
|
||||||
|
case NOTE_RESET_VIDEO_TRANSACTION: {
|
||||||
|
CHECK_INTERFACE(IBatteryStats, data, reply);
|
||||||
|
noteResetVideo();
|
||||||
|
reply->writeNoException();
|
||||||
|
return NO_ERROR;
|
||||||
|
} break;
|
||||||
|
case NOTE_RESET_AUDIO_TRANSACTION: {
|
||||||
|
CHECK_INTERFACE(IBatteryStats, data, reply);
|
||||||
|
noteResetAudio();
|
||||||
|
reply->writeNoException();
|
||||||
|
return NO_ERROR;
|
||||||
|
} break;
|
||||||
default:
|
default:
|
||||||
return BBinder::onTransact(code, data, reply, flags);
|
return BBinder::onTransact(code, data, reply, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user