summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm19
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 {