diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-25 11:17:38 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:18 -0800 |
commit | 5927fe032d58ef8edbf1b410276cf2de4f901d48 (patch) | |
tree | d5bc4aafbb197473e246c66f8c24b2f306a0948f | |
parent | 9d1bf66629d277013ff19a3d717a96aa423c41b5 (diff) |
Add debugging to isSafeToSuspend:.
-rw-r--r-- | MobileCydia.mm | 19 |
1 files changed, 18 insertions, 1 deletions
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 { |