summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/IBatteryStats.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/binder/IBatteryStats.cpp b/libs/binder/IBatteryStats.cpp
index 82bde62..8f3b7b4 100644
--- a/libs/binder/IBatteryStats.cpp
+++ b/libs/binder/IBatteryStats.cpp
@@ -77,6 +77,18 @@ public:
data.writeInt32(uid);
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");
@@ -131,6 +143,18 @@ status_t BnBatteryStats::onTransact(
reply->writeNoException();
return NO_ERROR;
} 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:
return BBinder::onTransact(code, data, reply, flags);
}