Loading include/android/keycodes.h +33 −1 Original line number Diff line number Diff line Loading @@ -776,7 +776,39 @@ enum { AKEYCODE_THUMBS_DOWN = 287, /** Used to switch current account that is consuming content. * May be consumed by system to switch current viewer profile. */ AKEYCODE_PROFILE_SWITCH = 288 AKEYCODE_PROFILE_SWITCH = 288, /** Video Application key #1. */ AKEYCODE_VIDEO_APP_1 = 289, /** Video Application key #2. */ AKEYCODE_VIDEO_APP_2 = 290, /** Video Application key #3. */ AKEYCODE_VIDEO_APP_3 = 291, /** Video Application key #4. */ AKEYCODE_VIDEO_APP_4 = 292, /** Video Application key #5. */ AKEYCODE_VIDEO_APP_5 = 293, /** Video Application key #6. */ AKEYCODE_VIDEO_APP_6 = 294, /** Video Application key #7. */ AKEYCODE_VIDEO_APP_7 = 295, /** Video Application key #8. */ AKEYCODE_VIDEO_APP_8 = 296, /** Featured Application key #1. */ AKEYCODE_FEATURED_APP_1 = 297, /** Featured Application key #2. */ AKEYCODE_FEATURED_APP_2 = 298, /** Featured Application key #3. */ AKEYCODE_FEATURED_APP_3 = 299, /** Featured Application key #4. */ AKEYCODE_FEATURED_APP_4 = 300, /** Demo Application key #1. */ AKEYCODE_DEMO_APP_1 = 301, /** Demo Application key #2. */ AKEYCODE_DEMO_APP_2 = 302, /** Demo Application key #3. */ AKEYCODE_DEMO_APP_3 = 303, /** Demo Application key #4. */ AKEYCODE_DEMO_APP_4 = 304, // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. Loading libs/graphicsenv/Android.bp +14 −2 Original line number Diff line number Diff line Loading @@ -27,10 +27,13 @@ cc_library_shared { srcs: [ "GpuStatsInfo.cpp", "GraphicsEnv.cpp", "IGpuService.cpp" "IGpuService.cpp", ], cflags: ["-Wall", "-Werror"], cflags: [ "-Wall", "-Werror", ], shared_libs: [ "libbase", Loading @@ -46,4 +49,13 @@ cc_library_shared { ], export_include_dirs: ["include"], product_variables: { // `debuggable` is set for eng and userdebug builds debuggable: { cflags: [ "-DANDROID_DEBUGGABLE", ], }, }, } libs/graphicsenv/GraphicsEnv.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,20 @@ static const std::string getSystemNativeLibraries(NativeLibrary type) { } bool GraphicsEnv::isDebuggable() { return prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; // This flag determines if the application is marked debuggable bool appDebuggable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; // This flag is set only in `debuggable` builds of the platform #if defined(ANDROID_DEBUGGABLE) bool platformDebuggable = true; #else bool platformDebuggable = false; #endif ALOGV("GraphicsEnv::isDebuggable returning appDebuggable=%s || platformDebuggable=%s", appDebuggable ? "true" : "false", platformDebuggable ? "true" : "false"); return appDebuggable || platformDebuggable; } void GraphicsEnv::setDriverPathAndSphalLibraries(const std::string path, Loading libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ public: // Check if the process is debuggable. It returns false except in any of the // following circumstances: // 1. ro.debuggable=1 (global debuggable enabled). // 1. ANDROID_DEBUGGABLE is defined (global debuggable enabled). // 2. android:debuggable="true" in the manifest for an individual app. // 3. An app which explicitly calls prctl(PR_SET_DUMPABLE, 1). // 4. GraphicsEnv calls prctl(PR_SET_DUMPABLE, 1) in the presence of Loading libs/gui/BLASTBufferQueue.cpp +15 −7 Original line number Diff line number Diff line Loading @@ -357,11 +357,12 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp<Fence } } for (const auto& staleRelease : staleReleases) { BQA_LOGE("Faking releaseBufferCallback from transactionCompleteCallback"); BBQ_TRACE("FakeReleaseCallback"); releaseBufferCallbackLocked(staleRelease, stat.previousReleaseFence ? stat.previousReleaseFence : Fence::NO_FENCE, stat.currentMaxAcquiredBufferCount); stat.previousReleaseFence ? stat.previousReleaseFence : Fence::NO_FENCE, stat.currentMaxAcquiredBufferCount, true /* fakeRelease */); } } else { BQA_LOGE("Failed to find matching SurfaceControl in transactionCallback"); Loading Loading @@ -405,11 +406,13 @@ void BLASTBufferQueue::releaseBufferCallback( BBQ_TRACE(); std::unique_lock _lock{mMutex}; releaseBufferCallbackLocked(id, releaseFence, currentMaxAcquiredBufferCount); releaseBufferCallbackLocked(id, releaseFence, currentMaxAcquiredBufferCount, false /* fakeRelease */); } void BLASTBufferQueue::releaseBufferCallbackLocked(const ReleaseCallbackId& id, const sp<Fence>& releaseFence, std::optional<uint32_t> currentMaxAcquiredBufferCount) { void BLASTBufferQueue::releaseBufferCallbackLocked( const ReleaseCallbackId& id, const sp<Fence>& releaseFence, std::optional<uint32_t> currentMaxAcquiredBufferCount, bool fakeRelease) { ATRACE_CALL(); BQA_LOGV("releaseBufferCallback %s", id.to_string().c_str()); Loading @@ -432,6 +435,11 @@ void BLASTBufferQueue::releaseBufferCallbackLocked(const ReleaseCallbackId& id, auto rb = ReleasedBuffer{id, releaseFence}; if (std::find(mPendingRelease.begin(), mPendingRelease.end(), rb) == mPendingRelease.end()) { mPendingRelease.emplace_back(rb); if (fakeRelease) { BQA_LOGE("Faking releaseBufferCallback from transactionCompleteCallback %" PRIu64, id.framenumber); BBQ_TRACE("FakeReleaseCallback"); } } // Release all buffers that are beyond the ones that we need to hold Loading Loading
include/android/keycodes.h +33 −1 Original line number Diff line number Diff line Loading @@ -776,7 +776,39 @@ enum { AKEYCODE_THUMBS_DOWN = 287, /** Used to switch current account that is consuming content. * May be consumed by system to switch current viewer profile. */ AKEYCODE_PROFILE_SWITCH = 288 AKEYCODE_PROFILE_SWITCH = 288, /** Video Application key #1. */ AKEYCODE_VIDEO_APP_1 = 289, /** Video Application key #2. */ AKEYCODE_VIDEO_APP_2 = 290, /** Video Application key #3. */ AKEYCODE_VIDEO_APP_3 = 291, /** Video Application key #4. */ AKEYCODE_VIDEO_APP_4 = 292, /** Video Application key #5. */ AKEYCODE_VIDEO_APP_5 = 293, /** Video Application key #6. */ AKEYCODE_VIDEO_APP_6 = 294, /** Video Application key #7. */ AKEYCODE_VIDEO_APP_7 = 295, /** Video Application key #8. */ AKEYCODE_VIDEO_APP_8 = 296, /** Featured Application key #1. */ AKEYCODE_FEATURED_APP_1 = 297, /** Featured Application key #2. */ AKEYCODE_FEATURED_APP_2 = 298, /** Featured Application key #3. */ AKEYCODE_FEATURED_APP_3 = 299, /** Featured Application key #4. */ AKEYCODE_FEATURED_APP_4 = 300, /** Demo Application key #1. */ AKEYCODE_DEMO_APP_1 = 301, /** Demo Application key #2. */ AKEYCODE_DEMO_APP_2 = 302, /** Demo Application key #3. */ AKEYCODE_DEMO_APP_3 = 303, /** Demo Application key #4. */ AKEYCODE_DEMO_APP_4 = 304, // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. Loading
libs/graphicsenv/Android.bp +14 −2 Original line number Diff line number Diff line Loading @@ -27,10 +27,13 @@ cc_library_shared { srcs: [ "GpuStatsInfo.cpp", "GraphicsEnv.cpp", "IGpuService.cpp" "IGpuService.cpp", ], cflags: ["-Wall", "-Werror"], cflags: [ "-Wall", "-Werror", ], shared_libs: [ "libbase", Loading @@ -46,4 +49,13 @@ cc_library_shared { ], export_include_dirs: ["include"], product_variables: { // `debuggable` is set for eng and userdebug builds debuggable: { cflags: [ "-DANDROID_DEBUGGABLE", ], }, }, }
libs/graphicsenv/GraphicsEnv.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,20 @@ static const std::string getSystemNativeLibraries(NativeLibrary type) { } bool GraphicsEnv::isDebuggable() { return prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; // This flag determines if the application is marked debuggable bool appDebuggable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; // This flag is set only in `debuggable` builds of the platform #if defined(ANDROID_DEBUGGABLE) bool platformDebuggable = true; #else bool platformDebuggable = false; #endif ALOGV("GraphicsEnv::isDebuggable returning appDebuggable=%s || platformDebuggable=%s", appDebuggable ? "true" : "false", platformDebuggable ? "true" : "false"); return appDebuggable || platformDebuggable; } void GraphicsEnv::setDriverPathAndSphalLibraries(const std::string path, Loading
libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ public: // Check if the process is debuggable. It returns false except in any of the // following circumstances: // 1. ro.debuggable=1 (global debuggable enabled). // 1. ANDROID_DEBUGGABLE is defined (global debuggable enabled). // 2. android:debuggable="true" in the manifest for an individual app. // 3. An app which explicitly calls prctl(PR_SET_DUMPABLE, 1). // 4. GraphicsEnv calls prctl(PR_SET_DUMPABLE, 1) in the presence of Loading
libs/gui/BLASTBufferQueue.cpp +15 −7 Original line number Diff line number Diff line Loading @@ -357,11 +357,12 @@ void BLASTBufferQueue::transactionCallback(nsecs_t /*latchTime*/, const sp<Fence } } for (const auto& staleRelease : staleReleases) { BQA_LOGE("Faking releaseBufferCallback from transactionCompleteCallback"); BBQ_TRACE("FakeReleaseCallback"); releaseBufferCallbackLocked(staleRelease, stat.previousReleaseFence ? stat.previousReleaseFence : Fence::NO_FENCE, stat.currentMaxAcquiredBufferCount); stat.previousReleaseFence ? stat.previousReleaseFence : Fence::NO_FENCE, stat.currentMaxAcquiredBufferCount, true /* fakeRelease */); } } else { BQA_LOGE("Failed to find matching SurfaceControl in transactionCallback"); Loading Loading @@ -405,11 +406,13 @@ void BLASTBufferQueue::releaseBufferCallback( BBQ_TRACE(); std::unique_lock _lock{mMutex}; releaseBufferCallbackLocked(id, releaseFence, currentMaxAcquiredBufferCount); releaseBufferCallbackLocked(id, releaseFence, currentMaxAcquiredBufferCount, false /* fakeRelease */); } void BLASTBufferQueue::releaseBufferCallbackLocked(const ReleaseCallbackId& id, const sp<Fence>& releaseFence, std::optional<uint32_t> currentMaxAcquiredBufferCount) { void BLASTBufferQueue::releaseBufferCallbackLocked( const ReleaseCallbackId& id, const sp<Fence>& releaseFence, std::optional<uint32_t> currentMaxAcquiredBufferCount, bool fakeRelease) { ATRACE_CALL(); BQA_LOGV("releaseBufferCallback %s", id.to_string().c_str()); Loading @@ -432,6 +435,11 @@ void BLASTBufferQueue::releaseBufferCallbackLocked(const ReleaseCallbackId& id, auto rb = ReleasedBuffer{id, releaseFence}; if (std::find(mPendingRelease.begin(), mPendingRelease.end(), rb) == mPendingRelease.end()) { mPendingRelease.emplace_back(rb); if (fakeRelease) { BQA_LOGE("Faking releaseBufferCallback from transactionCompleteCallback %" PRIu64, id.framenumber); BBQ_TRACE("FakeReleaseCallback"); } } // Release all buffers that are beyond the ones that we need to hold Loading