From 5927fe032d58ef8edbf1b410276cf2de4f901d48 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 25 Feb 2011 11:17:38 -0800 Subject: Add debugging to isSafeToSuspend:. --- MobileCydia.mm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 3c2c3b2..f24459b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9376,6 +9376,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (BOOL) isSafeToSuspend { + if (locked_ != 0) { +#if !ForRelease + NSLog(@"isSafeToSuspend: locked_ != 0"); +#endif + return false; + } + // Use external process status API internally. // This is probably a really bad idea. // XXX: what is the point of this? does this solve anything at all? @@ -9386,7 +9393,17 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { notify_cancel(notify_token); } - return locked_ == 0 && status == 0; + if (status != 0) { +#if !ForRelease + NSLog(@"isSafeToSuspend: status != 0"); +#endif + return false; + } + +#if !ForRelease + NSLog(@"isSafeToSuspend: -> true"); +#endif + return true; } - (void) applicationSuspend:(__GSEvent *)event { -- cgit v1.2.3