Loading cmds/installd/otapreopt_chroot.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -61,11 +61,15 @@ static void CloseDescriptor(const char* descriptor_string) { static std::vector<apex::ApexFile> ActivateApexPackages() { // The logic here is (partially) copied and adapted from // system/apex/apexd/apexd_main.cpp. // system/apex/apexd/apexd.cpp. // // Only scan the APEX directory under /system (within the chroot dir). // Only scan the APEX directory under /system, /system_ext and /vendor (within the chroot dir). std::vector<const char*> apex_dirs{apex::kApexPackageSystemDir, apex::kApexPackageSystemExtDir, apex::kApexPackageVendorDir}; for (const auto& dir : apex_dirs) { // Cast call to void to suppress warn_unused_result. static_cast<void>(apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir)); static_cast<void>(apex::scanPackagesDirAndActivate(dir)); } return apex::getActivePackages(); } Loading include/android/sensor.h +3 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,9 @@ enum { ASENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 35, /** * {@link ASENSOR_TYPE_HINGE_ANGLE} * reporting-mode: on-change * * The hinge angle sensor value is returned in degrees. */ ASENSOR_TYPE_HINGE_ANGLE = 36, }; Loading libs/binder/ndk/include_platform/android/binder_parcel_platform.h 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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. */ #pragma once #include <android/binder_parcel.h> __BEGIN_DECLS /** * Gets whether or not FDs are allowed by this AParcel * * \return true if FDs are allowed, false if they are not. That is * if this returns false then AParcel_writeParcelFileDescriptor will * return STATUS_FDS_NOT_ALLOWED. */ bool AParcel_getAllowFds(const AParcel*); __END_DECLS No newline at end of file libs/binder/ndk/libbinder_ndk.map.txt +5 −0 Original line number Diff line number Diff line Loading @@ -114,3 +114,8 @@ LIBBINDER_NDK30 { # introduced=30 local: *; }; LIBBINDER_NDK_PLATFORM { global: AParcel_getAllowFds; }; libs/binder/ndk/parcel.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ #include <android/binder_parcel.h> #include <android/binder_parcel_platform.h> #include "parcel_internal.h" #include "ibinder_internal.h" Loading Loading @@ -645,4 +646,8 @@ binder_status_t AParcel_readByteArray(const AParcel* parcel, void* arrayData, return ReadArray<int8_t>(parcel, arrayData, allocator); } bool AParcel_getAllowFds(const AParcel* parcel) { return parcel->get()->allowFds(); } // @END Loading
cmds/installd/otapreopt_chroot.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -61,11 +61,15 @@ static void CloseDescriptor(const char* descriptor_string) { static std::vector<apex::ApexFile> ActivateApexPackages() { // The logic here is (partially) copied and adapted from // system/apex/apexd/apexd_main.cpp. // system/apex/apexd/apexd.cpp. // // Only scan the APEX directory under /system (within the chroot dir). // Only scan the APEX directory under /system, /system_ext and /vendor (within the chroot dir). std::vector<const char*> apex_dirs{apex::kApexPackageSystemDir, apex::kApexPackageSystemExtDir, apex::kApexPackageVendorDir}; for (const auto& dir : apex_dirs) { // Cast call to void to suppress warn_unused_result. static_cast<void>(apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir)); static_cast<void>(apex::scanPackagesDirAndActivate(dir)); } return apex::getActivePackages(); } Loading
include/android/sensor.h +3 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,9 @@ enum { ASENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 35, /** * {@link ASENSOR_TYPE_HINGE_ANGLE} * reporting-mode: on-change * * The hinge angle sensor value is returned in degrees. */ ASENSOR_TYPE_HINGE_ANGLE = 36, }; Loading
libs/binder/ndk/include_platform/android/binder_parcel_platform.h 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 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. */ #pragma once #include <android/binder_parcel.h> __BEGIN_DECLS /** * Gets whether or not FDs are allowed by this AParcel * * \return true if FDs are allowed, false if they are not. That is * if this returns false then AParcel_writeParcelFileDescriptor will * return STATUS_FDS_NOT_ALLOWED. */ bool AParcel_getAllowFds(const AParcel*); __END_DECLS No newline at end of file
libs/binder/ndk/libbinder_ndk.map.txt +5 −0 Original line number Diff line number Diff line Loading @@ -114,3 +114,8 @@ LIBBINDER_NDK30 { # introduced=30 local: *; }; LIBBINDER_NDK_PLATFORM { global: AParcel_getAllowFds; };
libs/binder/ndk/parcel.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ #include <android/binder_parcel.h> #include <android/binder_parcel_platform.h> #include "parcel_internal.h" #include "ibinder_internal.h" Loading Loading @@ -645,4 +646,8 @@ binder_status_t AParcel_readByteArray(const AParcel* parcel, void* arrayData, return ReadArray<int8_t>(parcel, arrayData, allocator); } bool AParcel_getAllowFds(const AParcel* parcel) { return parcel->get()->allowFds(); } // @END