Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21f7ff14 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Automerger Merge Worker
Browse files

Merge "Don't use Android properties outside of Android" into main am:...

Merge "Don't use Android properties outside of Android" into main am: 897ac13a am: bcfdf390 am: bb331e24

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2819218



Change-Id: I6ab86f890e8df5607585b745e9914b677b3d2826
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 028457db bb331e24
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1358,7 +1358,11 @@ private:
};

TEST(BinderRpc, Java) {
#if !defined(__ANDROID__)
    bool expectDebuggable = false;
#if defined(__ANDROID__)
    expectDebuggable = android::base::GetBoolProperty("ro.debuggable", false) &&
            android::base::GetProperty("ro.build.type", "") != "user";
#else
    GTEST_SKIP() << "This test is only run on Android. Though it can technically run on host on"
                    "createRpcDelegateServiceManager() with a device attached, such test belongs "
                    "to binderHostDeviceTest. Hence, just disable this test on host.";
@@ -1386,8 +1390,7 @@ TEST(BinderRpc, Java) {
    auto keepAlive = sp<BBinder>::make();
    auto setRpcClientDebugStatus = binder->setRpcClientDebug(std::move(socket), keepAlive);

    if (!android::base::GetBoolProperty("ro.debuggable", false) ||
        android::base::GetProperty("ro.build.type", "") == "user") {
    if (!expectDebuggable) {
        ASSERT_EQ(INVALID_OPERATION, setRpcClientDebugStatus)
                << "setRpcClientDebug should return INVALID_OPERATION on non-debuggable or user "
                   "builds, but get "
+4 −1
Original line number Diff line number Diff line
@@ -36,9 +36,12 @@
#include <string>
#include <vector>

#ifdef __ANDROID__
#include <android-base/properties.h>
#endif

#ifndef __TRUSTY__
#include <android-base/file.h>
#include <android-base/properties.h>
#include <android/binder_auto_utils.h>
#include <android/binder_libbinder.h>
#include <binder/ProcessState.h>