mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156943 - Make proper HangMonitor calls in Android nsAppShell; r=snorp
This commit is contained in:
parent
acc6804a18
commit
c3c75478fa
@ -505,6 +505,16 @@ public:
|
||||
return event;
|
||||
}
|
||||
|
||||
bool IsInputEvent() const {
|
||||
return mType == AndroidGeckoEvent::MOTION_EVENT ||
|
||||
mType == AndroidGeckoEvent::NATIVE_GESTURE_EVENT ||
|
||||
mType == AndroidGeckoEvent::LONG_PRESS ||
|
||||
mType == AndroidGeckoEvent::KEY_EVENT ||
|
||||
mType == AndroidGeckoEvent::IME_EVENT ||
|
||||
mType == AndroidGeckoEvent::IME_KEY_EVENT ||
|
||||
mType == AndroidGeckoEvent::APZ_INPUT_EVENT;
|
||||
}
|
||||
|
||||
int Action() { return mAction; }
|
||||
int Type() { return mType; }
|
||||
bool AckNeeded() { return mAckNeeded; }
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "nsINetworkLinkService.h"
|
||||
#include "nsCategoryManagerUtils.h"
|
||||
|
||||
#include "mozilla/BackgroundHangMonitor.h"
|
||||
#include "mozilla/HangMonitor.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
@ -244,6 +244,7 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||
if (!curEvent && mayWait) {
|
||||
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent::Wait",
|
||||
js::ProfileEntry::Category::EVENTS);
|
||||
mozilla::HangMonitor::Suspend();
|
||||
|
||||
// hmm, should we really hardcode this 10s?
|
||||
#if defined(DEBUG_ANDROID_EVENTS)
|
||||
@ -264,7 +265,9 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||
if (!curEvent)
|
||||
return false;
|
||||
|
||||
mozilla::BackgroundHangMonitor().NotifyActivity();
|
||||
mozilla::HangMonitor::NotifyActivity(curEvent->IsInputEvent() ?
|
||||
mozilla::HangMonitor::kUIActivity :
|
||||
mozilla::HangMonitor::kGeneralActivity);
|
||||
|
||||
EVLOG("nsAppShell: event %p %d", (void*)curEvent.get(), curEvent->Type());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user