summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:26:17 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:26:17 +0000
commit02d09325d85880ac03bbd883c799afd3c35c2d04 (patch)
tree5bad823c29258e881625abb4bfe40dc035d842e0
parentc1e7f90f00b056fce0eeec2a56ba069f972b1167 (diff)
parent522219f9c76214aeec23b2cd8e5733122e0207e3 (diff)
downloadpixel-q_tzdata_aml_297100000.tar.gz
Change-Id: I4398fcbd814cfc605bb5a66fdccc2796bbe57659
-rw-r--r--atrace/Android.bp1
-rw-r--r--atrace/service.cpp4
-rw-r--r--fastboot/Android.bp1
-rw-r--r--health/Android.bp2
-rw-r--r--perfstatsd/Android.bp1
-rw-r--r--pixelstats/Android.bp2
-rw-r--r--power-libperfmgr/Android.bp1
-rw-r--r--recovery/Android.bp24
-rw-r--r--recovery/recovery_ui.cpp116
-rw-r--r--thermal/Android.bp5
-rw-r--r--thermal/android.hardware.thermal@2.0-service.pixel.rc1
-rw-r--r--usb/Android.bp2
12 files changed, 15 insertions, 145 deletions
diff --git a/atrace/Android.bp b/atrace/Android.bp
index 8ddb7c86..560f47b1 100644
--- a/atrace/Android.bp
+++ b/atrace/Android.bp
@@ -29,6 +29,7 @@ cc_binary {
"libbase",
"libutils",
"libhidlbase",
+ "libhidltransport",
"android.hardware.atrace@1.0",
],
}
diff --git a/atrace/service.cpp b/atrace/service.cpp
index f510325b..3164aa26 100644
--- a/atrace/service.cpp
+++ b/atrace/service.cpp
@@ -33,8 +33,8 @@ using ::android::hardware::atrace::V1_0::implementation::AtraceDevice;
int main(int /* argc */, char * /* argv */ []) {
sp<IAtraceDevice> atrace = new AtraceDevice;
configureRpcThreadpool(1, true /* will join */);
- auto serviceRegistrar = LazyServiceRegistrar::getInstance();
- if (serviceRegistrar.registerService(atrace) != OK) {
+ auto serviceRegistrar = std::make_shared<LazyServiceRegistrar>();
+ if (serviceRegistrar->registerService(atrace) != OK) {
ALOGE("Could not register service.");
return 1;
}
diff --git a/fastboot/Android.bp b/fastboot/Android.bp
index 646c0a9e..72ade19e 100644
--- a/fastboot/Android.bp
+++ b/fastboot/Android.bp
@@ -24,6 +24,7 @@ cc_library {
shared_libs: [
"libbase",
"libhidlbase",
+ "libhidltransport",
"libutils",
"libcutils",
"android.hardware.fastboot@1.0",
diff --git a/health/Android.bp b/health/Android.bp
index 46a0a4db..256bf126 100644
--- a/health/Android.bp
+++ b/health/Android.bp
@@ -29,6 +29,8 @@ cc_library {
"libbase",
"libcutils",
"libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
"libutils",
],
}
diff --git a/perfstatsd/Android.bp b/perfstatsd/Android.bp
index 541aff7d..a65d1a9c 100644
--- a/perfstatsd/Android.bp
+++ b/perfstatsd/Android.bp
@@ -22,6 +22,7 @@ cc_defaults {
"libbinder",
"libcutils",
"libhidlbase",
+ "libhwbinder",
"liblog",
"libutils",
],
diff --git a/pixelstats/Android.bp b/pixelstats/Android.bp
index d0627aa8..48c946d5 100644
--- a/pixelstats/Android.bp
+++ b/pixelstats/Android.bp
@@ -34,7 +34,6 @@ java_library {
srcs: [
"pixelatoms.proto",
],
- sdk_version: "current",
}
cc_library {
@@ -57,6 +56,7 @@ cc_library {
"libbinder",
"libcutils",
"libhidlbase",
+ "libhidltransport",
"liblog",
"libutils",
"pixelatoms-cpp",
diff --git a/power-libperfmgr/Android.bp b/power-libperfmgr/Android.bp
index ca2aedaf..7874d10b 100644
--- a/power-libperfmgr/Android.bp
+++ b/power-libperfmgr/Android.bp
@@ -33,6 +33,7 @@ cc_binary {
shared_libs: [
"libbase",
"libhidlbase",
+ "libhidltransport",
"liblog",
"libutils",
"libcutils",
diff --git a/recovery/Android.bp b/recovery/Android.bp
deleted file mode 100644
index ee44a03a..00000000
--- a/recovery/Android.bp
+++ /dev/null
@@ -1,24 +0,0 @@
-cc_library_static {
- name: "librecovery_ui_pixel",
- owner: "google",
- cflags: [
- "-Wall",
- "-Wextra",
- "-Werror",
- "-pedantic",
- ],
- srcs: [
- "recovery_ui.cpp",
- ],
-
- static_libs: [
- "libbase",
- "libbootloader_message",
- "libnos_for_recovery",
- "libnos_citadel_for_recovery",
- ],
-
- shared_libs: [
- "librecovery_ui",
- ],
-}
diff --git a/recovery/recovery_ui.cpp b/recovery/recovery_ui.cpp
deleted file mode 100644
index abaec99b..00000000
--- a/recovery/recovery_ui.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include <stdint.h>
-#include <string.h>
-
-#include <string>
-#include <string_view>
-#include <vector>
-
-#include <android-base/endian.h>
-#include <android-base/logging.h>
-#include <app_nugget.h>
-#include <bootloader_message/bootloader_message.h>
-#include <nos/NuggetClient.h>
-#include <nos/debug.h>
-#include <recovery_ui/device.h>
-#include <recovery_ui/screen_ui.h>
-
-namespace android {
-namespace hardware {
-namespace google {
-namespace pixel {
-
-namespace {
-
-/** Wipe user data from Titan M. */
-bool WipeTitanM() {
- // Connect to Titan M
- ::nos::NuggetClient client;
- client.Open();
- if (!client.IsOpen()) {
- LOG(ERROR) << "Failed to connect to Titan M";
- return false;
- }
-
- // Tell it to wipe user data
- const uint32_t magicValue = htole32(ERASE_CONFIRMATION);
- std::vector<uint8_t> magic(sizeof(magicValue));
- memcpy(magic.data(), &magicValue, sizeof(magicValue));
- const uint32_t status
- = client.CallApp(APP_ID_NUGGET, NUGGET_PARAM_NUKE_FROM_ORBIT, magic, nullptr);
- if (status != APP_SUCCESS) {
- LOG(ERROR) << "Titan M user data wipe failed: " << ::nos::StatusCodeString(status)
- << " (" << status << ")";
- return false;
- }
-
- LOG(INFO) << "Titan M wipe successful";
- return true;
-}
-
-// Wipes the provisioned flag as part of data wipe.
-bool WipeProvisionedFlag() {
- // Must be consistent with the one in init.hardware.rc (10-byte `theme-dark`).
- const std::string wipe_str(10, '\x00');
- constexpr size_t kProvisionedFlagOffsetInVendorSpace = 0;
- if (std::string err; !WriteMiscPartitionVendorSpace(
- wipe_str.data(), wipe_str.size(), kProvisionedFlagOffsetInVendorSpace, &err)) {
- LOG(ERROR) << "Failed to write kWipeProvisionedString: " << err;
- return false;
- }
- LOG(INFO) << "Provisioned flag wiped successful";
- return true;
-}
-
-} // namespace
-
-class PixelDevice : public ::Device
-{
-public:
- explicit PixelDevice(::ScreenRecoveryUI* const ui) : ::Device(ui) {}
-
- /** Hook to wipe user data not stored in /data */
- bool PostWipeData() override {
- // Try to do everything but report a failure if anything wasn't successful
- bool totalSuccess = true;
- ::RecoveryUI* const ui = GetUI();
-
- ui->Print("Wiping Titan M...\n");
- if (!WipeTitanM()) {
- totalSuccess = false;
- }
-
- if (!WipeProvisionedFlag()) {
- totalSuccess = false;
- }
-
- // Extendable to wipe other components
-
- return totalSuccess;
- }
-};
-
-} // namespace pixel
-} // namespace google
-} // namespace hardware
-} // namespace android
-
-Device *make_device()
-{
- return new ::android::hardware::google::pixel::PixelDevice(new ::ScreenRecoveryUI);
-}
diff --git a/thermal/Android.bp b/thermal/Android.bp
index dce083bf..60d1c700 100644
--- a/thermal/Android.bp
+++ b/thermal/Android.bp
@@ -17,11 +17,14 @@ cc_binary {
"utils/thermal_files.cpp",
"utils/thermal_watcher.cpp",
],
+ static_libs: [
+ "libjsoncpp",
+ ],
shared_libs: [
"libbase",
"libcutils",
"libhidlbase",
- "libjsoncpp",
+ "libhidltransport",
"libutils",
"android.hardware.thermal@1.0",
"android.hardware.thermal@2.0",
diff --git a/thermal/android.hardware.thermal@2.0-service.pixel.rc b/thermal/android.hardware.thermal@2.0-service.pixel.rc
index fd2735b0..27fc14a3 100644
--- a/thermal/android.hardware.thermal@2.0-service.pixel.rc
+++ b/thermal/android.hardware.thermal@2.0-service.pixel.rc
@@ -1,5 +1,4 @@
service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.pixel
- interface android.hardware.thermal@1.0::IThermal default
interface android.hardware.thermal@2.0::IThermal default
class hal
user system
diff --git a/usb/Android.bp b/usb/Android.bp
index 22909181..6df6c36b 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -34,6 +34,8 @@ cc_library_static {
"libbase",
"libcutils",
"libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
"libutils",
],
}