Loading services/core/java/com/android/server/power/PowerManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1645,7 +1645,7 @@ public final class PowerManagerService extends SystemService } // Called from native code. private void userActivityFromNative(long eventTime, int event, int flags) { private void userActivityFromNative(long eventTime, int event, int displayId, int flags) { userActivityInternal(eventTime, event, flags, Process.SYSTEM_UID); } Loading services/core/jni/com_android_server_input_InputManagerService.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -331,7 +331,7 @@ public: uint32_t policyFlags) override; bool dispatchUnhandledKey(const sp<IBinder>& token, const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) override; void pokeUserActivity(nsecs_t eventTime, int32_t eventType) override; void pokeUserActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId) override; bool checkInjectEventsPermissionNonReentrant(int32_t injectorPid, int32_t injectorUid) override; void onPointerDownOutsideFocus(const sp<IBinder>& touchedToken) override; void setPointerCapture(bool enabled) override; Loading Loading @@ -1325,9 +1325,9 @@ bool NativeInputManager::dispatchUnhandledKey(const sp<IBinder>& token, return result; } void NativeInputManager::pokeUserActivity(nsecs_t eventTime, int32_t eventType) { void NativeInputManager::pokeUserActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId) { ATRACE_CALL(); android_server_PowerManagerService_userActivity(eventTime, eventType); android_server_PowerManagerService_userActivity(eventTime, eventType, displayId); } bool NativeInputManager::checkInjectEventsPermissionNonReentrant( Loading services/core/jni/com_android_server_power_PowerManagerService.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -103,7 +103,8 @@ static bool setPowerMode(Mode mode, bool enabled) { return result == power::HalResult::SUCCESSFUL; } void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) { void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId) { if (gPowerManagerServiceObj) { // Throttle calls into user activity by event type. // We're a little conservative about argument checking here in case the caller Loading @@ -127,7 +128,7 @@ void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t env->CallVoidMethod(gPowerManagerServiceObj, gPowerManagerServiceClassInfo.userActivityFromNative, nanoseconds_to_milliseconds(eventTime), eventType, 0); nanoseconds_to_milliseconds(eventTime), eventType, displayId, 0); checkAndClearExceptionFromCallback(env, "userActivityFromNative"); } } Loading Loading @@ -285,7 +286,7 @@ int register_android_server_PowerManagerService(JNIEnv* env) { FIND_CLASS(clazz, "com/android/server/power/PowerManagerService"); GET_METHOD_ID(gPowerManagerServiceClassInfo.userActivityFromNative, clazz, "userActivityFromNative", "(JII)V"); "userActivityFromNative", "(JIII)V"); // Initialize for (int i = 0; i <= USER_ACTIVITY_EVENT_LAST; i++) { Loading services/core/jni/com_android_server_power_PowerManagerService.h +2 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ namespace android { extern void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType); extern void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId); } // namespace android Loading Loading
services/core/java/com/android/server/power/PowerManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1645,7 +1645,7 @@ public final class PowerManagerService extends SystemService } // Called from native code. private void userActivityFromNative(long eventTime, int event, int flags) { private void userActivityFromNative(long eventTime, int event, int displayId, int flags) { userActivityInternal(eventTime, event, flags, Process.SYSTEM_UID); } Loading
services/core/jni/com_android_server_input_InputManagerService.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -331,7 +331,7 @@ public: uint32_t policyFlags) override; bool dispatchUnhandledKey(const sp<IBinder>& token, const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) override; void pokeUserActivity(nsecs_t eventTime, int32_t eventType) override; void pokeUserActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId) override; bool checkInjectEventsPermissionNonReentrant(int32_t injectorPid, int32_t injectorUid) override; void onPointerDownOutsideFocus(const sp<IBinder>& touchedToken) override; void setPointerCapture(bool enabled) override; Loading Loading @@ -1325,9 +1325,9 @@ bool NativeInputManager::dispatchUnhandledKey(const sp<IBinder>& token, return result; } void NativeInputManager::pokeUserActivity(nsecs_t eventTime, int32_t eventType) { void NativeInputManager::pokeUserActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId) { ATRACE_CALL(); android_server_PowerManagerService_userActivity(eventTime, eventType); android_server_PowerManagerService_userActivity(eventTime, eventType, displayId); } bool NativeInputManager::checkInjectEventsPermissionNonReentrant( Loading
services/core/jni/com_android_server_power_PowerManagerService.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -103,7 +103,8 @@ static bool setPowerMode(Mode mode, bool enabled) { return result == power::HalResult::SUCCESSFUL; } void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) { void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId) { if (gPowerManagerServiceObj) { // Throttle calls into user activity by event type. // We're a little conservative about argument checking here in case the caller Loading @@ -127,7 +128,7 @@ void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t env->CallVoidMethod(gPowerManagerServiceObj, gPowerManagerServiceClassInfo.userActivityFromNative, nanoseconds_to_milliseconds(eventTime), eventType, 0); nanoseconds_to_milliseconds(eventTime), eventType, displayId, 0); checkAndClearExceptionFromCallback(env, "userActivityFromNative"); } } Loading Loading @@ -285,7 +286,7 @@ int register_android_server_PowerManagerService(JNIEnv* env) { FIND_CLASS(clazz, "com/android/server/power/PowerManagerService"); GET_METHOD_ID(gPowerManagerServiceClassInfo.userActivityFromNative, clazz, "userActivityFromNative", "(JII)V"); "userActivityFromNative", "(JIII)V"); // Initialize for (int i = 0; i <= USER_ACTIVITY_EVENT_LAST; i++) { Loading
services/core/jni/com_android_server_power_PowerManagerService.h +2 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ namespace android { extern void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType); extern void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType, int32_t displayId); } // namespace android Loading