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

Commit 23e27db5 authored by Xin Li's avatar Xin Li
Browse files

Merge commit 'a63ccea6' from

oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: Ia33311cd1fd26dfaea59a69317b306fb91203c40
Merged-In: I03d06b10807e8a313c9654c2e1db36bfb59e3f99
parents ea41bcf7 a63ccea6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -60,4 +60,14 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.$(TARGET_D
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.$(TARGET_DEVICE).so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/vendor)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/libtrusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/libtrusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/keystore.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/keystore.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/secure-storage-unit-test)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/storageproxyd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/tipc-test)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/trusty_keymaster_tipc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/root)
+5 −1
Original line number Diff line number Diff line
@@ -12,8 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

cc_library_static {
cc_library {
    name: "libadf",
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    srcs: ["adf.cpp"],
    cflags: ["-Werror"],
    local_include_dirs: ["include"],
+3 −5
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer)
{
    uint64_t dev_sz;
    int fd, rc = 0;
    int status;

    if ((fd = open(fs_blkdev, O_WRONLY)) < 0) {
        PERROR << "Cannot open block device";
@@ -62,7 +61,7 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer)
    const char* const mke2fs_args[] = {
        "/system/bin/mke2fs", "-t", "ext4", "-b", "4096", fs_blkdev, size_str.c_str(), nullptr};

    rc = android_fork_execvp_ext(arraysize(mke2fs_args), const_cast<char**>(mke2fs_args), &status,
    rc = android_fork_execvp_ext(arraysize(mke2fs_args), const_cast<char**>(mke2fs_args), NULL,
                                 true, LOG_KLOG, true, nullptr, nullptr, 0);
    if (rc) {
        LERROR << "mke2fs returned " << rc;
@@ -78,7 +77,7 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer)
        nullptr};

    rc = android_fork_execvp_ext(arraysize(e2fsdroid_args), const_cast<char**>(e2fsdroid_args),
                                 &status, true, LOG_KLOG, true, nullptr, nullptr, 0);
                                 NULL, true, LOG_KLOG, true, nullptr, nullptr, 0);
    if (rc) {
        LERROR << "e2fsdroid returned " << rc;
    }
@@ -88,10 +87,9 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer)

static int format_f2fs(char *fs_blkdev)
{
    int status;
    const char* const args[] = {"/system/bin/make_f2fs", "-f", "-O encrypt", fs_blkdev, nullptr};

    return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), &status, true,
    return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), NULL, true,
                                   LOG_KLOG, true, nullptr, nullptr, 0);
}

+1 −2
Original line number Diff line number Diff line
@@ -21,8 +21,7 @@ LOCAL_CFLAGS := -Wall -Wextra -Werror -Wunused
LOCAL_SRC_FILES := \
	SoftGateKeeperDevice.cpp \
	IGateKeeperService.cpp \
	gatekeeperd.cpp \
	IUserManager.cpp
	gatekeeperd.cpp

LOCAL_MODULE := gatekeeperd
LOCAL_SHARED_LIBRARIES := \

gatekeeperd/IUserManager.cpp

deleted100644 → 0
+0 −57
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 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.
 */

#define LOG_TAG "IUserManager"
#include <stdint.h>
#include <sys/types.h>
#include <utils/Log.h>
#include <binder/Parcel.h>

#include "IUserManager.h"

namespace android {

class BpUserManager : public BpInterface<IUserManager>
{
public:
    explicit BpUserManager(const sp<IBinder>& impl) :
            BpInterface<IUserManager>(impl) {
    }
    virtual int32_t getCredentialOwnerProfile(int32_t user_id) {
        Parcel data, reply;
        data.writeInterfaceToken(IUserManager::getInterfaceDescriptor());
        data.writeInt32(user_id);
        status_t rc = remote()->transact(GET_CREDENTIAL_OWNER_PROFILE, data, &reply, 0);
        if (rc != NO_ERROR) {
            ALOGE("%s: failed (%d)\n", __func__, rc);
            return -1;
        }

        int32_t exception = reply.readExceptionCode();
        if (exception != 0) {
            ALOGE("%s: got exception (%d)\n", __func__, exception);
            return -1;
        }

        return reply.readInt32();
    }

};

IMPLEMENT_META_INTERFACE(UserManager, "android.os.IUserManager");

}; // namespace android
Loading