summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-11-07 08:45:22 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-11-07 08:45:22 +0000
commit49e48ce0016d6a0023fe80673f0b081473fb487e (patch)
tree643f681575e18cd15f2d0efb15f1262677713efb
parentc952bcc3c75ca22ed6c50c0daedae7293200fa5e (diff)
parent3798435adf8101586d6d69e967be3c7aa1804056 (diff)
downloadlibhardware_legacy-49e48ce0016d6a0023fe80673f0b081473fb487e.tar.gz
Snap for 6958804 from 3798435adf8101586d6d69e967be3c7aa1804056 to sc-d1-release
Change-Id: Ie9edce12b7b3cc176d7d87a305bde475c1ef19c0
-rw-r--r--Android.bp2
-rw-r--r--power_test.cpp16
2 files changed, 9 insertions, 9 deletions
diff --git a/Android.bp b/Android.bp
index d196ee6..4ddf7e6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -36,8 +36,8 @@ cc_test {
srcs: ["power_test.cpp"],
static_libs: ["libpower"],
shared_libs: [
+ "android.system.suspend.control.internal-cpp",
"android.system.suspend@1.0",
- "suspend_control_aidl_interface-cpp",
],
test_suites: ["device-tests"],
require_root: true,
diff --git a/power_test.cpp b/power_test.cpp
index d6e414d..32cff70 100644
--- a/power_test.cpp
+++ b/power_test.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <android/system/suspend/ISuspendControlService.h>
+#include <android/system/suspend/internal/ISuspendControlServiceInternal.h>
#include <binder/IServiceManager.h>
#include <gtest/gtest.h>
#include <hardware_legacy/power.h>
@@ -27,8 +27,8 @@
#include <vector>
using android::sp;
-using android::system::suspend::ISuspendControlService;
-using android::system::suspend::WakeLockInfo;
+using android::system::suspend::internal::ISuspendControlServiceInternal;
+using android::system::suspend::internal::WakeLockInfo;
using namespace std::chrono_literals;
namespace android {
@@ -94,13 +94,13 @@ class WakeLockTest : public ::testing::Test {
public:
virtual void SetUp() override {
sp<IBinder> control =
- android::defaultServiceManager()->getService(android::String16("suspend_control"));
- ASSERT_NE(control, nullptr) << "failed to get the suspend control service";
- controlService = interface_cast<ISuspendControlService>(control);
+ android::defaultServiceManager()->getService(android::String16("suspend_control_internal"));
+ ASSERT_NE(control, nullptr) << "failed to get the internal suspend control service";
+ controlService = interface_cast<ISuspendControlServiceInternal>(control);
}
// Returns true iff found.
- bool findWakeLockInfoByName(const sp<ISuspendControlService>& service, const std::string& name,
+ bool findWakeLockInfoByName(const sp<ISuspendControlServiceInternal>& service, const std::string& name,
WakeLockInfo* info) {
std::vector<WakeLockInfo> wlStats;
service->getWakeLockStats(&wlStats);
@@ -114,7 +114,7 @@ class WakeLockTest : public ::testing::Test {
}
// All userspace wake locks are registered with system suspend.
- sp<ISuspendControlService> controlService;
+ sp<ISuspendControlServiceInternal> controlService;
};
// Test RAII properties of WakeLock destructor.