summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-10-25 00:18:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-10-25 00:18:53 +0000
commitc3787a8a83034e2d416baa1ce13b6ebeaf639f7e (patch)
treeb09bf669d5af116067646dae6cf421aa46f4c174 /core/java/android
parent5a6a5417ec5fe2a9f18577abc6e6906e8377b066 (diff)
parent31eb67b3498d326659b2b164ff367a01a793d641 (diff)
Merge "Adds aidl definitions and their implementations for binder transfer of statsd entries to clients. This change only includes changes on statds side and does not include java library for clients to import. Java library will be a separate change as it requires system api review."
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/IStatsCallbacks.aidl25
-rw-r--r--core/java/android/os/IStatsManager.aidl13
2 files changed, 38 insertions, 0 deletions
diff --git a/core/java/android/os/IStatsCallbacks.aidl b/core/java/android/os/IStatsCallbacks.aidl
new file mode 100644
index 000000000000..02e7cd3978c8
--- /dev/null
+++ b/core/java/android/os/IStatsCallbacks.aidl
@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) 2016, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+/**
+ * Callback for Statsd to allow binder calls to clients.
+ * {@hide}
+ */
+interface IStatsCallbacks {
+ void onReceiveLogs(out byte[] log);
+}
diff --git a/core/java/android/os/IStatsManager.aidl b/core/java/android/os/IStatsManager.aidl
index daacc4e832f9..480296c12e50 100644
--- a/core/java/android/os/IStatsManager.aidl
+++ b/core/java/android/os/IStatsManager.aidl
@@ -16,6 +16,8 @@
package android.os;
+import android.os.IStatsCallbacks;
+
/**
* Binder interface to communicate with the statistics management service.
* {@hide}
@@ -61,4 +63,15 @@ interface IStatsManager {
* Inform stats that an app was removed.
*/
oneway void informOnePackageRemoved(in String app, in int uid);
+
+ /**
+ * Trigger pushLog to force push stats log entries from statsd on client side.
+ */
+ void requestPush();
+
+ /**
+ * Listen to statsd to send stats log entries.
+ * TODO: Limit callbacks with specific configurations.
+ */
+ void subscribeStatsLog(IStatsCallbacks callbacks);
}