Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
tustanivsky committed Jun 27, 2024
1 parent b2ad902 commit 7263b2e
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool SentryEventAndroid::IsCrash() const
return CallMethod<bool>(IsCrashMethod);
}

bool SentryEventAndroid::IsAppNotResponding() const
bool SentryEventAndroid::IsAnr() const
{
return CallStaticMethod<bool>(SentryJavaClasses::SentryBridgeJava, "isAnrEvent", "(Lio/sentry/SentryEvent;)Z", GetJObject());
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SentryEventAndroid : public ISentryEvent, public FSentryJavaObjectWrapper
virtual void SetLevel(ESentryLevel level) override;
virtual ESentryLevel GetLevel() const override;
virtual bool IsCrash() const override;
virtual bool IsAppNotResponding() const override;
virtual bool IsAnr() const override;

private:
FSentryJavaMethod SetMessageMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool SentryEventApple::IsCrash() const
return EventApple.error != nullptr;
}

bool SentryEventApple::IsAppNotResponding() const
bool SentryEventApple::IsAnr() const
{
bool isErrorLevel = EventApple.level == kSentryLevelError;
bool isAppHangException = false;
Expand Down
2 changes: 1 addition & 1 deletion plugin-dev/Source/Sentry/Private/Apple/SentryEventApple.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SentryEventApple : public ISentryEvent
virtual void SetLevel(ESentryLevel level) override;
virtual ESentryLevel GetLevel() const override;
virtual bool IsCrash() const override;
virtual bool IsAppNotResponding() const override;
virtual bool IsAnr() const override;

private:
SentryEvent* EventApple;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool SentryEventDesktop::IsCrash() const
return IsCrashEvent;
}

bool SentryEventDesktop::IsAppNotResponding() const
bool SentryEventDesktop::IsAnr() const
{
// ANR error tracking is not available in `sentry-native`
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SentryEventDesktop : public ISentryEvent
virtual void SetLevel(ESentryLevel level) override;
virtual ESentryLevel GetLevel() const override;
virtual bool IsCrash() const override;
virtual bool IsAppNotResponding() const override;
virtual bool IsAnr() const override;

private:
sentry_value_t EventDesktop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ class ISentryEvent
virtual void SetLevel(ESentryLevel level) = 0;
virtual ESentryLevel GetLevel() const = 0;
virtual bool IsCrash() const = 0;
virtual bool IsAppNotResponding() const = 0;
virtual bool IsAnr() const = 0;
};
4 changes: 2 additions & 2 deletions plugin-dev/Source/Sentry/Private/SentryEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ bool USentryEvent::IsCrash() const
return EventNativeImpl->IsCrash();
}

bool USentryEvent::IsAppNotResponding() const
bool USentryEvent::IsAnr() const
{
if(!EventNativeImpl)
return false;

return EventNativeImpl->IsAppNotResponding();
return EventNativeImpl->IsAnr();
}

void USentryEvent::InitWithNativeImpl(TSharedPtr<ISentryEvent> eventImpl)
Expand Down
4 changes: 2 additions & 2 deletions plugin-dev/Source/Sentry/Public/SentryEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class SENTRY_API USentryEvent : public UObject
bool IsCrash() const;

/** Gets flag indicating whether the event is an Application Not Responding (ANR) error. */
UFUNCTION(BlueprintPure, Category = "Sentry")
bool IsAppNotResponding() const;
UFUNCTION(BlueprintPure, Category = "Sentry", meta=(DisplayName="Is App Not Responding"))
bool IsAnr() const;

void InitWithNativeImpl(TSharedPtr<ISentryEvent> eventImpl);
TSharedPtr<ISentryEvent> GetNativeImpl();
Expand Down

0 comments on commit 7263b2e

Please sign in to comment.