summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-30 07:47:11 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-30 07:47:11 -0700
commit856b8388ba6423823008aa77e4b83a4b9a37983b (patch)
tree309a2f0d1d4b80675a8c203ab79e523e07360000 /MobileCydia.mm
parent60b6595c940625df33137df2003f0f0305f75d59 (diff)
SpringBoard kills apps that are being reinstalled.v1.1.14
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm15
1 files changed, 14 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 290cf49..15a4f81 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -709,6 +709,7 @@ static const NSString *UI_;
static int Finish_;
static bool RestartSubstrate_;
+static bool UpgradeCydia_;
static NSArray *Finishes_;
#define SpringBoard_ "/System/Library/LaunchDaemons/com.apple.SpringBoard.plist"
@@ -5167,6 +5168,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
issues_ = [NSMutableArray arrayWithCapacity:4];
+ UpgradeCydia_ = false;
+
for (Package *package in packages) {
pkgCache::PkgIterator iterator([package iterator]);
NSString *name([package id]);
@@ -5278,6 +5281,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
[removes addObject:name];
}
+ if ([name isEqualToString:@"cydia"])
+ UpgradeCydia_ = true;
+
substrate_ |= DepSubstrate(policy->GetCandidateVer(iterator));
substrate_ |= DepSubstrate(iterator.CurrentVer());
}
@@ -9362,7 +9368,14 @@ _end
- (void) _uicache {
_trace();
- system("/usr/bin/uicache");
+
+ if (UpgradeCydia_ && Finish_ > 0) {
+ setreugid(0, 0);
+ system("su -c /usr/bin/uicache mobile");
+ } else {
+ system("/usr/bin/uicache");
+ }
+
_trace();
}