2017-08-16 01:26:53 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 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.
|
|
|
|
*/
|
|
|
|
|
2021-02-17 04:02:14 +01:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
|
|
}
|
|
|
|
|
2017-08-16 01:26:53 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "storaged_defaults",
|
|
|
|
|
|
|
|
shared_libs: [
|
2017-09-27 23:01:30 +02:00
|
|
|
"android.hardware.health@1.0",
|
|
|
|
"android.hardware.health@2.0",
|
2021-12-06 23:29:40 +01:00
|
|
|
"android.hardware.health-V1-ndk",
|
2017-08-16 01:26:53 +02:00
|
|
|
"libbase",
|
|
|
|
"libbinder",
|
2021-12-06 23:29:40 +01:00
|
|
|
"libbinder_ndk",
|
2017-08-16 01:26:53 +02:00
|
|
|
"libcutils",
|
2017-09-27 23:01:30 +02:00
|
|
|
"libhidlbase",
|
2017-08-16 01:26:53 +02:00
|
|
|
"liblog",
|
2017-08-15 01:41:24 +02:00
|
|
|
"libprotobuf-cpp-lite",
|
2017-08-16 01:26:53 +02:00
|
|
|
"libutils",
|
2017-08-15 01:41:24 +02:00
|
|
|
"libz",
|
2021-08-26 16:17:53 +02:00
|
|
|
"packagemanager_aidl-cpp",
|
2017-08-16 01:26:53 +02:00
|
|
|
],
|
|
|
|
|
2021-12-06 23:29:40 +01:00
|
|
|
static_libs: [
|
|
|
|
"android.hardware.health-translate-ndk",
|
|
|
|
"libhealthhalutils",
|
|
|
|
"libhealthshim",
|
|
|
|
],
|
|
|
|
|
2017-08-16 01:26:53 +02:00
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wno-unused-parameter"
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
|
|
|
name: "libstoraged",
|
|
|
|
|
|
|
|
defaults: ["storaged_defaults"],
|
|
|
|
|
2017-10-13 02:02:17 +02:00
|
|
|
aidl: {
|
|
|
|
export_aidl_headers: true,
|
|
|
|
local_include_dirs: ["binder"],
|
|
|
|
include_dirs: ["frameworks/native/aidl/binder"],
|
|
|
|
},
|
|
|
|
|
2017-08-16 01:26:53 +02:00
|
|
|
srcs: [
|
|
|
|
"storaged.cpp",
|
2017-08-30 01:48:20 +02:00
|
|
|
"storaged_diskstats.cpp",
|
2017-08-16 01:26:53 +02:00
|
|
|
"storaged_info.cpp",
|
|
|
|
"storaged_service.cpp",
|
|
|
|
"storaged_utils.cpp",
|
|
|
|
"storaged_uid_monitor.cpp",
|
2017-10-13 02:02:17 +02:00
|
|
|
"uid_info.cpp",
|
2017-08-15 01:41:24 +02:00
|
|
|
"storaged.proto",
|
2017-11-25 17:46:56 +01:00
|
|
|
":storaged_aidl",
|
2018-09-15 06:27:31 +02:00
|
|
|
":storaged_aidl_private",
|
2017-08-16 01:26:53 +02:00
|
|
|
],
|
|
|
|
|
2018-05-04 23:20:34 +02:00
|
|
|
header_libs: ["libbatteryservice_headers"],
|
2018-01-17 02:50:58 +01:00
|
|
|
|
2017-08-16 01:26:53 +02:00
|
|
|
logtags: ["EventLogTags.logtags"],
|
|
|
|
|
2017-08-15 01:41:24 +02:00
|
|
|
proto: {
|
|
|
|
type: "lite",
|
|
|
|
export_proto_headers: true,
|
|
|
|
},
|
|
|
|
|
2017-08-16 01:26:53 +02:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "storaged",
|
|
|
|
|
|
|
|
defaults: ["storaged_defaults"],
|
|
|
|
|
|
|
|
init_rc: ["storaged.rc"],
|
|
|
|
|
|
|
|
srcs: ["main.cpp"],
|
|
|
|
|
2018-01-17 02:50:58 +01:00
|
|
|
static_libs: [
|
|
|
|
"libstoraged",
|
|
|
|
],
|
2017-08-16 01:26:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Run with:
|
|
|
|
* adb shell /data/nativetest/storaged-unit-tests/storaged-unit-tests
|
|
|
|
*/
|
|
|
|
cc_test {
|
|
|
|
name: "storaged-unit-tests",
|
|
|
|
|
|
|
|
defaults: ["storaged_defaults"],
|
|
|
|
|
|
|
|
srcs: ["tests/storaged_test.cpp"],
|
|
|
|
|
2018-01-17 00:49:08 +01:00
|
|
|
static_libs: [
|
|
|
|
"libstoraged",
|
|
|
|
],
|
2021-12-07 08:04:12 +01:00
|
|
|
test_suites: [
|
|
|
|
"general-tests",
|
|
|
|
],
|
2017-09-27 23:01:30 +02:00
|
|
|
}
|
2017-11-25 17:46:56 +01:00
|
|
|
|
|
|
|
// AIDL interface between storaged and framework.jar
|
|
|
|
filegroup {
|
|
|
|
name: "storaged_aidl",
|
|
|
|
srcs: [
|
|
|
|
"binder/android/os/IStoraged.aidl",
|
|
|
|
],
|
2018-09-15 06:27:31 +02:00
|
|
|
path: "binder",
|
|
|
|
}
|
|
|
|
|
|
|
|
filegroup {
|
|
|
|
name: "storaged_aidl_private",
|
|
|
|
srcs: [
|
|
|
|
"binder/android/os/storaged/IStoragedPrivate.aidl",
|
|
|
|
],
|
|
|
|
path: "binder",
|
2017-11-25 17:46:56 +01:00
|
|
|
}
|