Loading data/etc/android.hardware.bluetooth_le.channel_sounding.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- 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. --> <!-- Adds the feature indicating support for the BLE Channel sounding --> <permissions> <feature name="android.hardware.bluetooth_le.channel_sounding" /> </permissions> include/android/performance_hint.h +19 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #define ANDROID_NATIVE_PERFORMANCE_HINT_H #include <sys/cdefs.h> #include <jni.h> /****************************************************************** * Loading Loading @@ -202,6 +203,9 @@ int APerformanceHint_reportActualWorkDuration( * Release the performance hint manager pointer acquired via * {@link APerformanceHint_createSession}. * * This cannot be used to close a Java PerformanceHintManager.Session, as its * lifecycle is tied to the object in the SDK. * * @param session The performance hint session instance to release. */ void APerformanceHint_closeSession( Loading Loading @@ -370,6 +374,21 @@ void AWorkDuration_setActualCpuDurationNanos(AWorkDuration* _Nonnull aWorkDurati void AWorkDuration_setActualGpuDurationNanos(AWorkDuration* _Nonnull aWorkDuration, int64_t actualGpuDurationNanos) __INTRODUCED_IN(__ANDROID_API_V__); /** * Return the APerformanceHintSession wrapped by a Java PerformanceHintManager.Session object. * * The Java session maintains ownership over the wrapped native session, so it cannot be * closed using {@link APerformanceHint_closeSession}. * * @param env The Java environment where the PerformanceHintManager.Session lives. * @param sessionObj The Java Session to unwrap. * * @return A pointer to the APerformanceHintManager that backs the Java Session. */ APerformanceHintSession* _Nonnull APerformanceHint_borrowSessionFromJava( JNIEnv* _Nonnull env, jobject _Nonnull sessionObj) __INTRODUCED_IN(36); __END_DECLS #endif // ANDROID_NATIVE_PERFORMANCE_HINT_H Loading include/powermanager/OWNERS 0 → 100644 +1 −0 Original line number Diff line number Diff line file:platform/frameworks/base:/ADPF_OWNERS No newline at end of file include/private/performance_hint_private.h +12 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,18 @@ APerformanceHintSession* APerformanceHint_createSessionInternal(APerformanceHint const int32_t* threadIds, size_t size, int64_t initialTargetWorkDurationNanos, SessionTag tag); /** * Creates a session from the Java SDK implementation */ APerformanceHintSession* APerformanceHint_createSessionFromJava(APerformanceHintManager* manager, const int32_t* threadIds, size_t size, int64_t initialTargetWorkDurationNanos); /** * Special method for Java SDK implementation to kill sessions */ void APerformanceHint_closeSessionFromJava(APerformanceHintSession* session); /** * Forces FMQ to be enabled or disabled, for testing only. */ Loading libs/gui/BufferItemConsumer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ status_t BufferItemConsumer::releaseBufferSlotLocked(int slotIndex, const sp<Gra BI_LOGE("Failed to addReleaseFenceLocked"); } err = releaseBufferLocked(slotIndex, buffer, EGL_NO_DISPLAY, EGL_NO_SYNC_KHR); err = releaseBufferLocked(slotIndex, buffer); if (err != OK && err != IGraphicBufferConsumer::STALE_BUFFER_SLOT) { BI_LOGE("Failed to release buffer: %s (%d)", strerror(-err), err); Loading Loading
data/etc/android.hardware.bluetooth_le.channel_sounding.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- 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. --> <!-- Adds the feature indicating support for the BLE Channel sounding --> <permissions> <feature name="android.hardware.bluetooth_le.channel_sounding" /> </permissions>
include/android/performance_hint.h +19 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ #define ANDROID_NATIVE_PERFORMANCE_HINT_H #include <sys/cdefs.h> #include <jni.h> /****************************************************************** * Loading Loading @@ -202,6 +203,9 @@ int APerformanceHint_reportActualWorkDuration( * Release the performance hint manager pointer acquired via * {@link APerformanceHint_createSession}. * * This cannot be used to close a Java PerformanceHintManager.Session, as its * lifecycle is tied to the object in the SDK. * * @param session The performance hint session instance to release. */ void APerformanceHint_closeSession( Loading Loading @@ -370,6 +374,21 @@ void AWorkDuration_setActualCpuDurationNanos(AWorkDuration* _Nonnull aWorkDurati void AWorkDuration_setActualGpuDurationNanos(AWorkDuration* _Nonnull aWorkDuration, int64_t actualGpuDurationNanos) __INTRODUCED_IN(__ANDROID_API_V__); /** * Return the APerformanceHintSession wrapped by a Java PerformanceHintManager.Session object. * * The Java session maintains ownership over the wrapped native session, so it cannot be * closed using {@link APerformanceHint_closeSession}. * * @param env The Java environment where the PerformanceHintManager.Session lives. * @param sessionObj The Java Session to unwrap. * * @return A pointer to the APerformanceHintManager that backs the Java Session. */ APerformanceHintSession* _Nonnull APerformanceHint_borrowSessionFromJava( JNIEnv* _Nonnull env, jobject _Nonnull sessionObj) __INTRODUCED_IN(36); __END_DECLS #endif // ANDROID_NATIVE_PERFORMANCE_HINT_H Loading
include/powermanager/OWNERS 0 → 100644 +1 −0 Original line number Diff line number Diff line file:platform/frameworks/base:/ADPF_OWNERS No newline at end of file
include/private/performance_hint_private.h +12 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,18 @@ APerformanceHintSession* APerformanceHint_createSessionInternal(APerformanceHint const int32_t* threadIds, size_t size, int64_t initialTargetWorkDurationNanos, SessionTag tag); /** * Creates a session from the Java SDK implementation */ APerformanceHintSession* APerformanceHint_createSessionFromJava(APerformanceHintManager* manager, const int32_t* threadIds, size_t size, int64_t initialTargetWorkDurationNanos); /** * Special method for Java SDK implementation to kill sessions */ void APerformanceHint_closeSessionFromJava(APerformanceHintSession* session); /** * Forces FMQ to be enabled or disabled, for testing only. */ Loading
libs/gui/BufferItemConsumer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ status_t BufferItemConsumer::releaseBufferSlotLocked(int slotIndex, const sp<Gra BI_LOGE("Failed to addReleaseFenceLocked"); } err = releaseBufferLocked(slotIndex, buffer, EGL_NO_DISPLAY, EGL_NO_SYNC_KHR); err = releaseBufferLocked(slotIndex, buffer); if (err != OK && err != IGraphicBufferConsumer::STALE_BUFFER_SLOT) { BI_LOGE("Failed to release buffer: %s (%d)", strerror(-err), err); Loading