From 216f3dc63617366782cdb42c58511105b43f49e0 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 27 Oct 2014 05:17:11 -0700 Subject: [PATCH] Flail around, attacking random "suspend" messages. --- MobileCydia.mm | 15 +++++++++++++++ iPhonePrivate.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index a6d5e892..83783e36 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9511,6 +9511,21 @@ _end return true; } +- (void) suspendReturningToLastApp:(BOOL)returning { + if ([self isSafeToSuspend]) + [super suspendReturningToLastApp:returning]; +} + +- (void) suspend { + if ([self isSafeToSuspend]) + [super suspend]; +} + +- (void) applicationSuspend { + if ([self isSafeToSuspend]) + [super applicationSuspend]; +} + - (void) applicationSuspend:(__GSEvent *)event { if ([self isSafeToSuspend]) [super applicationSuspend:event]; diff --git a/iPhonePrivate.h b/iPhonePrivate.h index 73a2bee3..ab1e24e8 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -210,6 +210,9 @@ static const UIActivityIndicatorViewStyle UIActivityIndicatorViewStyleWhiteTiny( @end @interface UIApplication (Apple) +- (void) suspendReturningToLastApp:(BOOL)returning; +- (void) suspend; +- (void) applicationSuspend; - (void) applicationSuspend:(GSEventRef)event; - (void) _animateSuspension:(BOOL)suspend duration:(double)duration startTime:(double)start scale:(float)scale; - (void) applicationOpenURL:(NSURL *)url; -- 2.47.2