diff options
author | Yifan Hong <elsk@google.com> | 2018-08-08 17:49:29 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2018-08-10 11:36:39 -0700 |
commit | 66a4144c9641647e1debbd32974aecb3810b0df1 (patch) | |
tree | 3b6a4079f62b19fd24e61a852dcfcd3dead0dedd /health | |
parent | 4ccae0fd74bf98b198c28910550f50d4d63e54f1 (diff) | |
download | android_hardware_interfaces-66a4144c9641647e1debbd32974aecb3810b0df1.tar.gz android_hardware_interfaces-66a4144c9641647e1debbd32974aecb3810b0df1.tar.bz2 android_hardware_interfaces-66a4144c9641647e1debbd32974aecb3810b0df1.zip |
Add health.filesystem HAL.
Test: builds
Bug: 111655771
Change-Id: I29f157912ef74b4efd64def93ea125aa079ac1eb
Merged-In: I29f157912ef74b4efd64def93ea125aa079ac1eb
Diffstat (limited to 'health')
-rw-r--r-- | health/filesystem/1.0/Android.bp | 21 | ||||
-rw-r--r-- | health/filesystem/1.0/IFileSystem.hal | 33 | ||||
-rw-r--r-- | health/filesystem/1.0/types.hal | 39 |
3 files changed, 93 insertions, 0 deletions
diff --git a/health/filesystem/1.0/Android.bp b/health/filesystem/1.0/Android.bp new file mode 100644 index 000000000..74b9bc31e --- /dev/null +++ b/health/filesystem/1.0/Android.bp @@ -0,0 +1,21 @@ +// This file is autogenerated by hidl-gen -Landroidbp. + +hidl_interface { + name: "android.hardware.health.filesystem@1.0", + root: "android.hardware", + vndk: { + enabled: true, + }, + srcs: [ + "types.hal", + "IFileSystem.hal", + ], + interfaces: [ + "android.hidl.base@1.0", + ], + types: [ + "Result", + ], + gen_java: true, +} + diff --git a/health/filesystem/1.0/IFileSystem.hal b/health/filesystem/1.0/IFileSystem.hal new file mode 100644 index 000000000..33ea3ff84 --- /dev/null +++ b/health/filesystem/1.0/IFileSystem.hal @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2018 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.hardware.health.filesystem@1.0; + +/** + * IFileSystem is an interface that provides operations on underlying storage + * devices, including flash memory. + */ +interface IFileSystem { + /** + * Start garbage collection on the driver of storage devices. This function + * must be called at regular intervals when it is a good time for a + * longer-running cleanup tasks. + * + * @return result Execution result. See documentation for Result for + * details. + */ + garbageCollect() generates (Result result); +}; diff --git a/health/filesystem/1.0/types.hal b/health/filesystem/1.0/types.hal new file mode 100644 index 000000000..00431f752 --- /dev/null +++ b/health/filesystem/1.0/types.hal @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2018 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.hardware.health.filesystem@1.0; + +/** + * Status values for HAL methods. + */ +enum Result : uint32_t { + /** + * Execution of the method is successful. + */ + SUCCESS = 0, + /** + * Execution of the method timed out. + */ + TIMEOUT, + /** + * An IO error is encountered when the HAL communicates with the device. + */ + IO_ERROR, + /** + * An unknown error is encountered. + */ + UNKNOWN_ERROR, +}; |