diff options
| author | yro <yro@google.com> | 2017-10-24 13:33:21 -0700 |
|---|---|---|
| committer | yro <yro@google.com> | 2017-10-24 15:25:27 -0700 |
| commit | 31eb67b3498d326659b2b164ff367a01a793d641 (patch) | |
| tree | ba4d304b2bf25127b99fb550f7684826c184ade2 /core/java | |
| parent | ce7416809a6953ad2d421977de2aae81cc0549f8 (diff) | |
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.
Test: statsd, statsd_test
Change-Id: I306c6e9687801668cc0145b12d38406bfe634775
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/IStatsCallbacks.aidl | 25 | ||||
| -rw-r--r-- | core/java/android/os/IStatsManager.aidl | 13 |
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); } |
