Loading include/android/input.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -1490,6 +1490,14 @@ int32_t AMotionEvent_getClassification(const AInputEvent* motion_event) */ */ const AInputEvent* AMotionEvent_fromJava(JNIEnv* env, jobject motionEvent) __INTRODUCED_IN(31); const AInputEvent* AMotionEvent_fromJava(JNIEnv* env, jobject motionEvent) __INTRODUCED_IN(31); /** * Creates a java android.view.InputEvent object that is a copy of the specified native * {@link AInputEvent}. Returns null on error * * Available since API level 35. */ jobject AInputEvent_toJava(JNIEnv* env, const AInputEvent* aInputEvent) __INTRODUCED_IN(35); struct AInputQueue; struct AInputQueue; /** /** * Input queue * Input queue Loading libs/binder/tests/binderLibTest.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -70,7 +70,7 @@ MATCHER_P(StatusEq, expected, (negation ? "not " : "") + statusToString(expected } } static ::testing::AssertionResult IsPageAligned(void *buf) { static ::testing::AssertionResult IsPageAligned(void *buf) { if (((unsigned long)buf & ((unsigned long)PAGE_SIZE - 1)) == 0) if (((unsigned long)buf & ((unsigned long)getpagesize() - 1)) == 0) return ::testing::AssertionSuccess(); return ::testing::AssertionSuccess(); else else return ::testing::AssertionFailure() << buf << " is not page aligned"; return ::testing::AssertionFailure() << buf << " is not page aligned"; Loading libs/sensorprivacy/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,7 @@ cc_library_shared { filegroup { filegroup { name: "libsensorprivacy_aidl", name: "libsensorprivacy_aidl", srcs: [ srcs: [ "aidl/android/hardware/CameraPrivacyAllowlistEntry.aidl", "aidl/android/hardware/ISensorPrivacyListener.aidl", "aidl/android/hardware/ISensorPrivacyListener.aidl", "aidl/android/hardware/ISensorPrivacyManager.aidl", "aidl/android/hardware/ISensorPrivacyManager.aidl", ], ], Loading libs/sensorprivacy/SensorPrivacyManager.cpp +34 −1 Original line number Original line Diff line number Diff line Loading @@ -143,6 +143,39 @@ status_t SensorPrivacyManager::isToggleSensorPrivacyEnabled(int toggleType, int return UNKNOWN_ERROR; return UNKNOWN_ERROR; } } int SensorPrivacyManager::getToggleSensorPrivacyState(int toggleType, int sensor) { sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { int result; service->getToggleSensorPrivacyState(toggleType, sensor, &result); return result; } // if the SensorPrivacyManager is not available then assume sensor privacy is disabled return DISABLED; } std::vector<hardware::CameraPrivacyAllowlistEntry> SensorPrivacyManager::getCameraPrivacyAllowlist(){ sp<hardware::ISensorPrivacyManager> service = getService(); std::vector<hardware::CameraPrivacyAllowlistEntry> result; if (service != nullptr) { service->getCameraPrivacyAllowlist(&result); return result; } return result; } bool SensorPrivacyManager::isCameraPrivacyEnabled(String16 packageName){ sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { bool result; service->isCameraPrivacyEnabled(packageName, &result); return result; } return false; } status_t SensorPrivacyManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) status_t SensorPrivacyManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) { { sp<hardware::ISensorPrivacyManager> service = getService(); sp<hardware::ISensorPrivacyManager> service = getService(); Loading libs/sensorprivacy/aidl/android/hardware/CameraPrivacyAllowlistEntry.aidl 0 → 100644 +22 −0 Original line number Original line Diff line number Diff line /** * Copyright (c) 2024, 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. */ package android.hardware; parcelable CameraPrivacyAllowlistEntry { String packageName; boolean isMandatory; } Loading
include/android/input.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -1490,6 +1490,14 @@ int32_t AMotionEvent_getClassification(const AInputEvent* motion_event) */ */ const AInputEvent* AMotionEvent_fromJava(JNIEnv* env, jobject motionEvent) __INTRODUCED_IN(31); const AInputEvent* AMotionEvent_fromJava(JNIEnv* env, jobject motionEvent) __INTRODUCED_IN(31); /** * Creates a java android.view.InputEvent object that is a copy of the specified native * {@link AInputEvent}. Returns null on error * * Available since API level 35. */ jobject AInputEvent_toJava(JNIEnv* env, const AInputEvent* aInputEvent) __INTRODUCED_IN(35); struct AInputQueue; struct AInputQueue; /** /** * Input queue * Input queue Loading
libs/binder/tests/binderLibTest.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -70,7 +70,7 @@ MATCHER_P(StatusEq, expected, (negation ? "not " : "") + statusToString(expected } } static ::testing::AssertionResult IsPageAligned(void *buf) { static ::testing::AssertionResult IsPageAligned(void *buf) { if (((unsigned long)buf & ((unsigned long)PAGE_SIZE - 1)) == 0) if (((unsigned long)buf & ((unsigned long)getpagesize() - 1)) == 0) return ::testing::AssertionSuccess(); return ::testing::AssertionSuccess(); else else return ::testing::AssertionFailure() << buf << " is not page aligned"; return ::testing::AssertionFailure() << buf << " is not page aligned"; Loading
libs/sensorprivacy/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -57,6 +57,7 @@ cc_library_shared { filegroup { filegroup { name: "libsensorprivacy_aidl", name: "libsensorprivacy_aidl", srcs: [ srcs: [ "aidl/android/hardware/CameraPrivacyAllowlistEntry.aidl", "aidl/android/hardware/ISensorPrivacyListener.aidl", "aidl/android/hardware/ISensorPrivacyListener.aidl", "aidl/android/hardware/ISensorPrivacyManager.aidl", "aidl/android/hardware/ISensorPrivacyManager.aidl", ], ], Loading
libs/sensorprivacy/SensorPrivacyManager.cpp +34 −1 Original line number Original line Diff line number Diff line Loading @@ -143,6 +143,39 @@ status_t SensorPrivacyManager::isToggleSensorPrivacyEnabled(int toggleType, int return UNKNOWN_ERROR; return UNKNOWN_ERROR; } } int SensorPrivacyManager::getToggleSensorPrivacyState(int toggleType, int sensor) { sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { int result; service->getToggleSensorPrivacyState(toggleType, sensor, &result); return result; } // if the SensorPrivacyManager is not available then assume sensor privacy is disabled return DISABLED; } std::vector<hardware::CameraPrivacyAllowlistEntry> SensorPrivacyManager::getCameraPrivacyAllowlist(){ sp<hardware::ISensorPrivacyManager> service = getService(); std::vector<hardware::CameraPrivacyAllowlistEntry> result; if (service != nullptr) { service->getCameraPrivacyAllowlist(&result); return result; } return result; } bool SensorPrivacyManager::isCameraPrivacyEnabled(String16 packageName){ sp<hardware::ISensorPrivacyManager> service = getService(); if (service != nullptr) { bool result; service->isCameraPrivacyEnabled(packageName, &result); return result; } return false; } status_t SensorPrivacyManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) status_t SensorPrivacyManager::linkToDeath(const sp<IBinder::DeathRecipient>& recipient) { { sp<hardware::ISensorPrivacyManager> service = getService(); sp<hardware::ISensorPrivacyManager> service = getService(); Loading
libs/sensorprivacy/aidl/android/hardware/CameraPrivacyAllowlistEntry.aidl 0 → 100644 +22 −0 Original line number Original line Diff line number Diff line /** * Copyright (c) 2024, 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. */ package android.hardware; parcelable CameraPrivacyAllowlistEntry { String packageName; boolean isMandatory; }