diff options
author | 2024-06-09 15:10:02 +0000 | |
---|---|---|
committer | 2024-06-13 17:25:08 +0000 | |
commit | 7f3d63f91e4704ca177cec312bb69e1d0a5c4628 (patch) | |
tree | 08a394c45d1d0f94edfbde3edf48afad69a6acb5 /proto/src | |
parent | f43c33083038780ebe47ddb2d162ad8635cede4a (diff) |
Expose InferenceInfo via Hidden API for V to use in Settings App.
- Parse InferenceInfo based on a proto definition to be reused in the remote implementation and passed as byte[] in the result Bundle incase of success and Base64 string in the PersistableBundle incase of failures.
- Add a in-memory list of inference info as received from the remote implementation.
- Evict entries based on max-age of configured 3 hours, as settings app
will query this data every hour.
Bug: 335390745
Change-Id: I92883c1009ffcda4f499e439928ab4528f6483a5
Diffstat (limited to 'proto/src')
-rw-r--r-- | proto/src/ondeviceintelligence/inference_info.proto | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/proto/src/ondeviceintelligence/inference_info.proto b/proto/src/ondeviceintelligence/inference_info.proto new file mode 100644 index 000000000000..a6f4f4fa4eba --- /dev/null +++ b/proto/src/ondeviceintelligence/inference_info.proto @@ -0,0 +1,34 @@ +/* + * Copyright 2024 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. + */ + +syntax = "proto2"; + +package android.ondeviceintelligence; + +option java_package = "com.android.server.ondeviceintelligence"; +option java_multiple_files = true; + + +message InferenceInfo { + // Uid for the caller app. + optional int32 uid = 1; + // Inference start time(milliseconds from the epoch time). + optional int64 start_time_ms = 2; + // Inference end time(milliseconds from the epoch time). + optional int64 end_time_ms = 3; + // Suspended time in milliseconds. + optional int64 suspended_time_ms = 4; +}
\ No newline at end of file |